Thanks all for the quick responses.
I'll try to make our artifacts so that they are only dependent on slf4j-api. Then, if people have dependencies on those artifacts, they won't get the logback implementation, and they can explicitly decide which implementation or bridge to pull in. Thanks again, Mike ----- Original Message ----- From: ceki <[email protected]> To: logback users list <[email protected]> Cc: Sent: Saturday, May 5, 2012 7:20 AM Subject: Re: [logback-user] Inverse log4j-over-slf4j? Hi Mike, As Chris described, remove log4j-over-slf4j.jar and just replace logback-core.jar and logback-classic.jar with slf4j-log4j12.jar in your class path. This will delegate all slf4j-api calls to log4j. You might also want to look at SLF4J docs [1,2] especially the illustrations. [1] http://www.slf4j.org/manual.html [2] http://www.slf4j.org/legacy.html HTH, -- Ceki http://twitter.com/#!/ceki On 04.05.2012 23:09, Chris Pratt wrote: > Tell them to add slf4j-api (since you use this directly), slf4j-log4j12 > (to send your logs to their logging engine) and to remove the logback > and log4j-over-slf4j jars (or they will cause collisions). Then they > can control their whole logging chain with their log4j.properties. > (*Chris*) > > On Fri, May 4, 2012 at 1:34 PM, Mike Boyers <[email protected] > <mailto:[email protected]>> wrote: > > We have a project that uses slf4j/logback for its logging. We have > dependencies we're pulling in that are using log4j, so for that, > we're using the log4j-over-slf4j bridge. We have a single > logback.xml configuration that controls it all, and everything is fine. > > But we publish artifacts, and other projects have our artifacts as > their dependencies, and they are using log4j strictly. Let's assume > they know nothing about logback and have no desire to switch. > > What technique to people typically follow in this case? Is there an > inverse log4j-over-slf4j bridge? > > Thanks, > Mike > > http://mailman.qos.ch/mailman/listinfo/logback-user _______________________________________________ Logback-user mailing list [email protected] http://mailman.qos.ch/mailman/listinfo/logback-user _______________________________________________ Logback-user mailing list [email protected] http://mailman.qos.ch/mailman/listinfo/logback-user
