I am having an issue with a log utility I have written wrapping some 
log4j classes. Ive read through the samples and other threads, but cant 
find a resolution ( which should be simple ).  My utility class sets up 
a category initializes to root and executes a static method upon 
creation as follows:


public class log{
  ...

 static{
    PropertyConfigurator.configure( "d:\\App\\WEB-
INF\\log4j.properties" );
 }

}


I have placed my config file (log4j.properties) in the d:\App\WEB-INF\ 
directory. It is a basic config that looks as follows:

log4j.rootLogger=ERROR, R

#Create a rolling file
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=example.log

# Keep 100 backup files of size 100kb
log4j.appender.R.MaxFileSize=100KB
log4j.appender.R.MaxBackupIndex=100

log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d [%t] %-5p %c - %m%n


The file seems to be read in properly, but I get the error:


   log4j:ERROR No appenders could be found for category (root).
   log4j:ERROR Please initialize the log4j system properly.


What am I missing?  Thanks,


Pete Serafin



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to