Hi, I´m getting an Exception that crashes the logged application when using this configuration file : log4j.rootCategory=debug, stdout log4j.appender.stdout=org.apache.log4j.FileAppender log4j.appender.stdout.File=System.out log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d{dat} [%t] %-5p %c - %m%n ^^^ (Note the wrong constant "dat" after %d) The exception is: java.lang.IllegalArgumentException: Illegal pattern character 't' at java.text.SimpleDateFormat.subFormat(SimpleDateFormat.java:477) at java.text.SimpleDateFormat.format(SimpleDateFormat.java:437) at java.text.DateFormat.format(DateFormat.java:305) at org.apache.log4j.helpers.PatternParser$DatePatternConverter.convert (PatternParser.java:429) at org.apache.log4j.helpers.PatternConverter.format (PatternConverter.java:56) at org.apache.log4j.PatternLayout.format(PatternLayout.java:472) at org.apache.log4j.FileAppender.subAppend(FileAppender.java:428) at org.apache.log4j.FileAppender.append(FileAppender.java:219) at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:221) at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders (AppenderAttachableImpl.java:56) at org.apache.log4j.Category.callAppenders(Category.java:258) at org.apache.log4j.Category.forcedLog(Category.java:454) at org.apache.log4j.Category.error(Category.java:367) at logtest.TestProg.main(TestProg.java:37) Of course, I should not use "dat" instead of "date", but this could happen when using a "watch-for-changes-in-property-file" configuration while editing. I hope this hadn´t been reported before ... this is the first time I´m using bugzilla ... Thanks, Hauke
Fixed in log4j 1.1. Thanks for the report!