[slf4j-user] blog entry on JCL

Ceki Gülcü listid at qos.ch
Mon Feb 5 21:35:24 CET 2007


I am glad to hear that it is beginning to work.

The disappearing location info problem has been previously reported [1]. 
Unfortunately, since there are two indirections involved 
(jcl->slf4j->log4j), it is not possible to correctly compute the location 
information.

[1] http://bugzilla.slf4j.org/show_bug.cgi?id=23


At 09:25 PM 2/5/2007, Matt Raible wrote:

 >Thanks - that works!  However, I'd expect the logging to look the same
 >as it did before.  Unfortunately, it looks like the method isn't
 >printed out - just "info", "debug", etc.  Here's my log4j.xml
 >configuration:
 >
 >    <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
 >        <layout class="org.apache.log4j.PatternLayout">
 >            <param name="ConversionPattern"
 >                value="%p [%t] %c{1}.%M(%L) | %m%n"/>
 >        </layout>
 >    </appender>
 >
 >commons-logging:
 >
 >WARN [main] UserAction.save(157) | User 'tomcat' already exists!
 >INFO [main] UserActionTest.endTransaction(284) | Rolled back
 >transaction after test execution
 >INFO [main] UserActionTest.startNewTransaction(318) | Began
 >transaction (1): transaction manager
 >[org.springframework.orm.hibernate3.HibernateTransactionManager at 77cd4a];
 >default rollback = true
 >INFO [main] UserActionTest.endTransaction(284) | Rolled back
 >transaction after test execution
 >INFO [main] UserActionTest.startNewTransaction(318) | Began
 >transaction (1): transaction manager
 >[org.springframework.orm.hibernate3.HibernateTransactionManager at 77cd4a];
 >default rollback = true
 >DEBUG [main] UserManagerImpl.removeUser(66) | removing user: 2
 >INFO [main] UserActionTest.endTransaction(284) | Rolled back
 >transaction after test execution
 >
 >SLF4J:
 >
 >WARN [main] UserAction.warn(139) | User 'tomcat' already exists!
 >INFO [main] UserActionTest.info(118) | Rolled back transaction after
 >test execution
 >INFO [main] UserActionTest.info(118) | Began transaction (1):
 >transaction manager
 >[org.springframework.orm.hibernate3.HibernateTransactionManager at f4b30a];
 >default rollback = true
 >INFO [main] UserActionTest.info(118) | Rolled back transaction after
 >test execution
 >INFO [main] UserActionTest.info(118) | Began transaction (1):
 >transaction manager
 >[org.springframework.orm.hibernate3.HibernateTransactionManager at f4b30a];
 >default rollback = true
 >DEBUG [main] UserManagerImpl.debug(97) | removing user: 2
 >INFO [main] UserActionTest.info(118) | Rolled back transaction after
 >test execution
 >
 >Thanks,

-- 
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch




More information about the slf4j-user mailing list