[slf4j-user] How to use slf4j to consolidate JUL and log4j output?

Rishi Madan rishimadan.rm at gmail.com
Wed Dec 4 07:13:24 CET 2013


Hi , Using

 SLF4JBridgeHandler.removeHandlersForRootLogger();


 SLF4JBridgeHandler.install();
will remove Resource Bundle messages for JUL logging when used with
Application Servers like WebSphere etc. This may cause missing of
server admin messages like , Server open for e-business.

However in new versions of WebSphere , fix for Resource bundle lookup is added.

http://www-01.ibm.com/support/docview.wss?uid=swg1PM86653

Regards
Rishi Madan





On Wed, Dec 4, 2013 at 7:02 AM, Marshall Pierce <marshall at mpierce.org>wrote:

> On Dec 3, 2013, at 5:27 PM, John Lussmyer <john at teamunify.com> wrote:
>
> > We have a large existing app that has several HttpServlets. These are
> currently written using log4j logging - except a few of the libs that were
> written with Java.util.logging uses.
> >
> > I'd REALLY REALLY like to get them all going through the log4j handling
> and output formatting.
> >
> > It looks like I should be able to use slf4j to do this - but I can't
> find any actual documentation on HOW. Just lots of "yeah, it can do things
> like that". I've added slf4j-api.jar, slf4j-log4j12.jar and
> jul-to=slf4j.jar to my class path.
> >
> > Since this doesn't seem to be handling the JUL logging (still coming out
> in it's own format), there must be something specific that needs to be done
> to get things hooked up/started - but I haven't been able to find the docs
> on exactly WHAT is needed.
>
> Sounds like the notes in
> http://www.slf4j.org/api/org/slf4j/bridge/SLF4JBridgeHandler.html should
> do the trick.
> _______________________________________________
> slf4j-user mailing list
> slf4j-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/slf4j-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/slf4j-user/attachments/20131204/63053c6e/attachment.html>


More information about the slf4j-user mailing list