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 Amit Bhutra <am...@hotmail.com> on 2002/07/09 17:21:45 UTC
new bie - Logging to different files depending on the level
Hi,
I have specified 2 RollingFileAppender in the .properties file.
In my java code, i have...
private static String resource = "/Log.properties";
private static URL configFileResource = Log.class.getResource(resource);
static
{
PropertyConfigurator.configure(configFileResource);
}
private static Logger Log1 = Logger.getLogger("Log1");
private static Logger Log2 = Logger.getLogger("Log2");
And then i call Log1.debug(msg).
I see that the message is in both Log1.log and Log2.log.
However, i want Log1.debug(msg) to log into Log1.log and
Log2.debug(msg) to log into Log2.log.
Let me know if anyone wants to see the code and property file.
TIA,
Amit
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>