i don't think so,

if you want to use the container jars you use the container config.

Could be a bug of logback but all logging lib have it

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/3/8 Will Hoover <[email protected]>

> Would this be considered a bug? Adding logback.xml to all of the jars in a
> war's WEB-INF/libs seems like a cumbersome workaround, right?
>
> -----Original Message-----
> From: Romain Manni-Bucau [mailto:[email protected]]
> Sent: Friday, March 08, 2013 8:57 AM
> To: [email protected]
> Subject: Re: Tomee slf4j
>
> yes,
>
> i just tested and it works (with trunk at least)
>
> logback + slf4j api + logback.xml in container and if needed the app (need
> to be delivered in the app if the conf is different)
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog:
> **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>
>
>
> 2013/3/8 Will Hoover <[email protected]>
>
> > You mean add the application's logback.xml to the jars in WEB-INF/lib?
> >
> > -----Original Message-----
> > From: Romain Manni-Bucau [mailto:[email protected]]
> > Sent: Friday, March 08, 2013 7:43 AM
> > To: [email protected]
> > Subject: RE: Tomee slf4j
> >
> > Hmm, for log4j it takes its conf in the classloader if the jar. Not
> > sure about logback but can be the same issue.
> >
> > The workaround is to merge both conf
> > Le 8 mars 2013 13:35, "Will Hoover" <[email protected]> a écrit :
> >
> > > Yes, slf4j-api-1.7.2.jar, logback-classic-1.0.7.jar,
> > > logback-core-1.0.7.jar, and log4j-over-slf4j-1.7.2.jar all exist
> > > under WEB-INF/lib of the deployed war.
> > >
> > > -----Original Message-----
> > > From: Romain Manni-Bucau [mailto:[email protected]]
> > > Sent: Friday, March 08, 2013 7:24 AM
> > > To: [email protected]
> > > Subject: Re: Tomee slf4j
> > >
> > > did you provide logback+/slf4j-api in the webapp?
> > >
> > > *Romain Manni-Bucau*
> > > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > > *Blog:
> > > **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.co
> > > m/
> > > >
> > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > > *Github: https://github.com/rmannibucau*
> > >
> > >
> > >
> > > 2013/3/8 Will Hoover <[email protected]>
> > >
> > > > Thanks for the replies!
> > > > I can get tomee to use slf4j/logback, but my issue is with
> > > > deployed applications that have their own logback.xml. Logging
> > > > from any class from within the deployed war works as expected (i.e.
> > > > logs/myapp.log), but any jar within the war's WEB-INF/lib is
> > > > logging to /logs/catalina.XXXX-XX-XX.log (I used spring
> > > > dependencies as
> > example).
> > > >
> > > > -----Original Message-----
> > > > From: Romain Manni-Bucau [mailto:[email protected]]
> > > > Sent: Friday, March 08, 2013 5:52 AM
> > > > To: [email protected]
> > > > Subject: Re: Tomee slf4j
> > > >
> > > > Hi,
> > > >
> > > > i just tested -Dopenejb.log.factory=slf4j removing slf4j-jdk14
> > > > from tomee and adding logback lib + a logback.xml. It works as
> > > > epected knowing this property only affects what it can (openejb,
> > > > tomee (not tomcat part),
> > > > OWB...) frameworks.
> > > >
> > > > Tomcat doesn't have a facade for logging so it is hard to switch
> > > > it without jul to slf4j workarounds.
> > > >
> > > > *Romain Manni-Bucau*
> > > > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> > > > *Blog:
> > > > **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.
> > > > co
> > > > m/
> > > > >
> > > > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> > > > *Github: https://github.com/rmannibucau*
> > > >
> > > >
> > > >
> > > > 2013/3/7 Harald Wellmann <[email protected]>
> > > >
> > > > > This is probably not the "official" approach (if there is one),
> > > > > but it worked for me:
> > > > >
> > > > > http://hwellmann.blogspot.de/**2012/11/logging-with-slf4j-**
> > > > > and-logback-in.html<http://hwellmann.blogspot.de/2012/11/logging
> > > > > -w
> > > > > it
> > > > > h-
> > > > > slf4j-and-logback-in.html>
> > > > >
> > > > > Best regards,
> > > > > Harald
> > > > >
> > > > >
> > > > > Am 07.03.2013 20:14, schrieb Will Hoover:
> > > > >
> > > > >  I noticed that
> > > > > http://openejb.apache.org/**properties-listing.html<http://opene
> > > > > jb .a pa che.org/properties-listing.html>does not
> > > > >> have an entry for openejb.log.factory?
> > > > >>
> > > > >>
> > > > >>
> > > > >> What is the process for getting Tomee to use slf4j/logback? I
> > > > >> tried adding the following to conf/system.properties, but it
> > > > >> doesn't seem to work as expected. The catalina log shows that
> > > > >> it's using org.apache.openejb.util.**Slf4jLogStream, but all of
> > > > >> the individual application logs are also going to the catalina
> > > > >> log rather than the log file defined in logback.xml
> > > > >>
> > > > >>
> > > > >>
> > > > >> openejb.log.factory=org.**apache.openejb.util.**Slf4jLogStreamF
> > > > >> ac
> > > > >> to
> > > > >> ry
> > > > >>
> > > > >>
> > > > >>
> > > > >>
> > > > >>
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>

Reply via email to