Hi,
Am new to log4j. Am using Tomcat 5 and my webapp-myNiceWebApp is in Tomcat/webapps/myNiceWebApp
I have a class that I have the following code in:
Logger logger = Logger.getLogger(Helper.class);
SimpleLayout layout = new SimpleLayout();
FileAppender appender = null;
try
{
appender = new FileAppender(layout,"output1.txt",false);
}
catch(Exception e)
{
e.printStackTrace();
}
logger.addAppender(appender);
logger.setLevel((Level)Level.DEBUG);
logger.debug("some message");Que 1. Where does the file output1.txt get created?
Que 2. How does log4j know where to create it and can it be controlled?
Que 3. I am going to use a configuration file either use the DOMConfigurator or PropertyConfigurator to load the log4j properties. Where do i place this file log4j configuration file?
Thanks,
