
I'm trying to use the parameterized logging feature in LogBack 0.2.5, but I can't get it to work. I'm using a basic configuration: <configuration> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <layout class="ch.qos.logback.classic.PatternLayout"> <param name="pattern" value="%-4relative [%thread] %-5level %class - %msg%n" /> </layout> </appender> <root> <level value="debug" /> <appender-ref ref="STDOUT" /> </root> </configuration> When logging debug("Hello {}", obj), I get the logging output "Hello {}". Is there anything special you have do do in order to get this working? Any special appenders or layouts? Any special objects as parameters to the logging function? Cheers, Rickard

Hello Rickard, Thanks for trying logback! The problem with parametrized logging wasn't on your side. It's now fixed. I made a test case (ch.qos.logback.classic.MessageFormattingTest), to check that. The corrected code was committed. You can checkout the project by using the following command: svn co http://svn.qos.ch/repos/logback/trunk DESTINATION_DIR Nothing special needs to be done in order to use parametrized logging. It's built in logback and any configuration can benefit from it. Thanks for your feedback, do not hesitate to email the list again if you encounter any other problems. Sébastien Rickard Nilsson a écrit :
I'm trying to use the parameterized logging feature in LogBack 0.2.5, but I can't get it to work. I'm using a basic configuration:
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <layout class="ch.qos.logback.classic.PatternLayout"> <param name="pattern" value="%-4relative [%thread] %-5level %class - %msg%n" /> </layout> </appender>
<root> <level value="debug" /> <appender-ref ref="STDOUT" /> </root> </configuration>
When logging debug("Hello {}", obj), I get the logging output "Hello {}". Is there anything special you have do do in order to get this working? Any special appenders or layouts? Any special objects as parameters to the logging function?
Cheers, Rickard _______________________________________________ Logback-user mailing list Logback-user@qos.ch http://qos.ch/mailman/listinfo/logback-user
-- Sébastien Pennec sebastien@qos.ch Logback: The reliable, generic, fast and flexible logging framework for Java.

Rickard, Just to be clear, the problem was a bug in logback, which we fixed a few moments ago. The modified code is available on the SVN trunk. You can either get it from SVN or wait until a new release is made incorporating the fix. I join Sébastien in thanking for your interest in logback. At 04:30 PM 8/30/2006, Sebastien Pennec wrote:
Hello Rickard,
Thanks for trying logback!
The problem with parametrized logging wasn't on your side.
It's now fixed. I made a test case (ch.qos.logback.classic.MessageFormattingTest), to check that.
The corrected code was committed. You can checkout the project by using the following command: svn co http://svn.qos.ch/repos/logback/trunk DESTINATION_DIR
Nothing special needs to be done in order to use parametrized logging. It's built in logback and any configuration can benefit from it.
Thanks for your feedback, do not hesitate to email the list again if you encounter any other problems.
Sébastien
-- Ceki Gülcü Logback: The reliable, generic, fast and flexible logging framework for Java.
participants (3)
-
Ceki Gülcü
-
Rickard Nilsson
-
Sebastien Pennec