You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Steve Mactaggart <st...@golftime.com.au> on 2004/05/18 03:12:30 UTC
DailyRollingFileAppender NPE
Hey all,
I have just got the latest from CVS to start working on the
EnhancedHTMLLayout suggested last week.
2 Things I have noticed:
- The current CVS version is NOT backwards compatible with 1.2.8,
I was wondering why not? I have written a few appenders myself
that required changes, but as I won't be using 1.3 for my production system
I don't want to have to change my code just to get it to compile under 1.3
(for HTMLLayout testing).
- Seems to be a problem with the DailyRollingFileAppender, when
running it I get the following error.
log4j:ERROR Could not create an Appender. Reported error follows.
java.lang.NullPointerException
at
org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAp
pender.java:211)
at
org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:228)
at
org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java
:154)
I assume the NPE is created in the "sdf.format(new
Date(file.lastModified()))" section of line 221, as sdf is never initalised
anywhere.
I noticed a commented out line
205: //sdf = new SimpleDateFormat(datePattern);
Is there a reason this is commented out? Or am I missing something obvious.
Thanks
--------------------------------
Steve Mactaggart
Systems Architect
Golftime International
WEB: http://www.golftime.com.au
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org