Other way is to explicitely tell log4j to use this file as follows PropertyConfigurator.configure("abs-path-of-config-simple.properties");
~Jitendra -----Original Message----- From: Harp, George [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 31, 2005 8:49 PM To: 'Log4J Users List' Subject: RE: log4j:ERROR... Please Help. ws the configuration file called log4j.properties and was it in your classpath? -----Original Message----- From: Silvia Suárez [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 31, 2005 10:17 AM To: log4j-user@logging.apache.org Subject: log4j:ERROR... Please Help. Dear all, I am using the log4j package for logging with java. The file down is the configuration file (config-simple.properties. However next error appears when I am running my program: log4j: ERROR No appenders could be found for category (sample.Myprogram2). log4j: ERROR Please initialize the log4j System properly. I am beggining on logging, I dont know what is the problem. Before, It was working and now it is not :-( Can somebody help me? Thanks a lot. ------------------------------------------------------ # # This defines the logging level for the rootLogger. It is not required # if you are going to keep the level at debug as the rootLogger by default # is at the debug level. The value after the comma is the appender for the # root and we have given it the name R # #log4j.rootLogger=debug, R log4j.rootCategory=DEBUG, LogFile log4j.appender.LogFile=org.apache.log4j.FileAppender log4j.appender.LogFile.File=client.log log4j.appender.LogFile.Append=false log4j.appender.LogFile.layout=org.apache.log4j.PatternLayout log4j.appender.LogFile.layout.ConversionPattern=%-5p %c{2}: %m%n log4j.category.sample.Myprogram1=DEBUG log4j.category.sample.Myprogram2=DEBUG log4j.category.sample.Myprogram3=DEBUG log4j.category.sample.Myprogram4=DEBUG log4j.category.sample.Myprogram5=DEBUG log4j.category.sample.Myprogram6=DEBUG # For this simple example, we are just going to log to the console # #log4j.appender.R=org.apache.log4j.ConsoleAppender # # When logging using the ConsoleAppender, the following value tells how and # what to log. The SimpleLayout simply logs the level of the message and # the message itself. # #log4j.appender.R.layout=org.apache.log4j.SimpleLayout --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]