Do you have an XML example? -----Original Message----- From: Alan Brown [mailto:[EMAIL PROTECTED] Sent: Thursday, April 29, 2004 4:08 PM To: Log4J Users List Subject: RE: Appender attached to a specific level
I think what you're asking is part of Log4J central design philosophy. Assuming you're following the standard method of logging (instantiating a logger for each class with the fully qualified class name as the logger name) what you want to do is add the following lines to your log4j properties file... log4j.logger.opsx.server.dac.base.OpsBaseDAC = DEBUG, A2 log4j.appender.A2=org.apache.log4j.RollingFileAppender log4j.appender.A2.MaxFileSize=1024KB log4j.appender.A2.MaxBackupIndex=40 log4j.appender.A2.File=\\sps\\YourLogFileNameForTheseEvents log4j.appender.A2.layout=org.apache.log4j.PatternLayout log4j.appender.A2.layout.ConversionPattern=* %-5p %d{MM/dd/yyyy}\t%d{HH:mm:ss,SSS}\t(%x)\t%m\r\n obviously you can adjust the conversion pattern to suit your tastes and you could use another type of appender if desired. You can also set the logging level as you desire in the first line. -----Original Message----- From: James Stauffer [mailto:[EMAIL PROTECTED] Sent: Thursday, April 29, 2004 1:48 PM To: 'Log4J Users List' Subject: Appender attached to a specific level Is it possible to attach to an appender to a specific level? If all my code is in sps.webec can I make an appender only log events under sps.webec? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]