Details
-
Bug
-
Resolution: Fixed
-
Minor
-
1.0.6
-
Win 7 (64bit), IDE - Netbeans 7.2, JDK 1.6
Description
When using the SMTPAppender as such:
<appender name="EMAIL" class="ch.qos.logback.classic.net.SMTPAppender">
<smtpHost>1.1.1.1</smtpHost>
<to>blah@blah</to>
<from>blah@blah</from>
<subject>TESTING: %logger
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>%d{yyyyMMddHHmm:ss} %level [%thread] %logger{36}
[%file:%line] %msg%n</pattern>
</layout>
</appender>
The resulting log prints out like so:
201208161255:43 DEBUG [main] LoggingStuff.Foo [?:?] Did it again!
201208161255:43 INFO [main] LoggingStuff.Foo [?:?] Ha info - do it
201208161255:43 WARN [main] LoggingStuff.Foo [?:?] Something is about to happen!
201208161255:43 ERROR [main] LoggingStuff.Foo [?:?] Serious stuff - is it?
java.lang.Exception: Yep
at LoggingStuff.Foo.doIt(Foo.java:56) [classes/:na]
at LoggingStuff.MyApp1.main(MyApp1.java:39) [classes/:na]
Where the %file and %line parameters are not set and show up as a '?'.