use rootCategory if u r using log4j 1.1.3 use rootLogger if u r using log4j 1.2 and onwards
Steve Wilkinson wrote: > You need something like this. > log4j.rootCategory=ERROR, R > > I don't know the log4j.rootLogger is a valid property. The "ERROR" tells it what >level to log and R tells it what appender to use. > > Hope that helps. > > ----- Original Message ----- > From: Pete Serafin > Sent: Tuesday, March 19, 2002 5:50 PM > To: [EMAIL PROTECTED] > Subject: Log4j Error > > 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]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>