[slf4j-user] Redirecting SLF4J log events to System.out

Johan Bos johan.bos at c6.eu
Mon Sep 28 19:54:50 CEST 2009


Hello everyone!

 

I have a library that must be inserted into a bigger project.

My lib uses slf4j.

 

The project is using my lib by injection call, calling main method,
configured through config files.

 

It works! That's not the point.

 

The bigger project is using log4j, but seems to also redirect internally all
log events from the system out and write them into a Database. I presume.

 

I did use the slf4j-log4j implementation... redirecting my log event to
log4j.

 

Configuring the log4j.properties from the bigger project seems to work;
meaning that I can see my logging events being written in the log file.

A Console appender is configured for the bigger project. I can see my log in
the server out log.

 

But if you followed, the project is also redirecting every System.out
events, and it doesn't take into account my log events!

 

My question:

 

Is there a way to make slf4 log go to System.out?

 

I want to spare the time of duplicating every log event into slf4j and
System.out

 

Apparently, before, we were using java.util.log, using a ConsoleAppender,
doing so seemed to work fine, the JUL events could go into the System out
and the System Out were redirected into the Database just fine.

 

How can I do the same using Slf4j?

 

I have no view or control over the bigger project!

 

Thanks in advance,

 

 

Johan

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/slf4j-user/attachments/20090928/b487243d/attachment.htm>


More information about the slf4j-user mailing list