[logback-user] Redirecting logback logs to log4j
Ceki Gulcu
ceki at qos.ch
Wed Aug 19 10:52:27 CEST 2009
Hello Johan,
Could you please read the slf4j manual [1] and the page on Bridging
legacy APIs [2]. Those pages contain the explanation you are
seeking. However, if you are still confused about how to proceed,
please contact this list once again.
[1] http://www.slf4j.org/manual.html
[2] http://www.slf4j.org/legacy.html
Johan Bos wrote:
> Hi,
>
>
>
> I designed component, packaged in jars, using slf4j and logback, this
> library is then packaged with a third party application using log4j.
>
> I presumed that slf4j and logback could be used to change your log
> system depending on the loaded libraries of your classpath.
>
> Here my configuration:
>
> my_library.jar using only slf4j and at some point logback dependencies
>
> included with it:
>
>
> slf4j-to-log4j.jar
> slf4j.jar
> log4j.jar à already present in the war.
> logback-*.jar
>
> All these libraries are installed into a third part webapp application
> (client_app.war), directly under the WEB-INF/lib directory of this
> application.
>
> This application has a log4j.properties, in the classes directory,
> changes are made to create a log4j logger.
>
> At my understanding, my library’s log events should be redirecting from
> slf4j/logback to log4j, using the log4j.properties, and so be written in
> the “client_app..log” configured?
>
> Am I wrong?
>
> Do I still need a logback.xml to be located under the classes of this
> webapps as well?
>
> Regards,
>
> Johan Bos**
>
>
--
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch
More information about the Logback-user
mailing list