You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Emricko Thomas E <em...@mellon.com> on 2001/07/13 22:48:49 UTC

DailyFileAppender Example Question.

Good Afternoon! 

I was in the process of updating our Log4j environment to version 1.1.3. I
was using a previous version which had packages named org.log4j. Well, my
DailyFileAppender did not work with this new release, so I decided to try
the example 'DailyFileAppender' that came with this new package
(org.apache.log4j.DailyFileAppender) and to my surprise it did not work
correctly either.

The Following errors appear on my console:

log4j:WARN No such property [filePattern] in
org.apache.log4j.DailyFileAppender.
log4j:ERROR Missing file pattern (FilePattern) in setFile().

Here is a copy of property file:

log4.category.com.tommy.utils=DEBUG,A1
log4j.appender.A1=org.apache.log4j.DailyFileAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.FilePattern='C:\\tommy-'yyyy-MM-dd'.log'

Tracing through the process of the classes and methods call I noticed that
the 'configureOptionHandler' method of the
org.apache.log4j.PropertyConfigurator class is commented out (by looking at
the Java file). This was the 'key' method in calling the setOption method of
the org.apache.log4j.DailyFileAppender class to grab the 'FilePattern' and
assign the value to it (key=value). As you can see from the errors, the
'FilePattern' is never being picked up by the PropertyConfigurator method
and setting the file assigned to FilePattern to be used to log messages to.

I would appreciate your help!

Tommy




*****************************************************************
DISCLAIMER:   The information contained in this e-mail may be confidential
and is intended solely for the use of the named addressee.  Access, copying
or re-use of the e-mail or any information contained therein by any other
person is not authorized.  If you are not the intended recipient please
notify us immediately by returning the e-mail to the originator.    

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org