Originally posted by Ulf Dittmer:
There's no problem in declaring multiple loggers in one file. You can start out by duplicating your single logger 5 times, giving them different names and pointing them at different files.
I agree we can duplicate the logger multiple times and specify different file names but the question is in my
JAVA code when i declare a logger like:
private static final Logger logger = Logger.getLogger(Test.class);
So if i use the instance of the logger to log , then it would dump to which log file, how would it know which log file to dump.
So i am still there itself.Please think it from development perspective in JAVA.
Using logger.debug(":::
Test Debug :::"); would dump into which log file as i have define 5 loggers in my log4j.xml file