-
1. Re: JBoss EJB & Log4j
jamesstrachan Dec 7, 2003 10:26 AM (in response to sbrytskyy)Please find attached a log4j configuration file that :-
a) Creates a separate file-based appender MILTONAPPLOG with a threshold of "DEBUG" to enable output of DEBUG messages;
b) Creates a console appender MILTONCONSOLE with a threshold of "DEBUG" to enable output of DEBUG messages to console;
c) Creates a logger that logs all Log4J output from packages starting "org.milton" to both MILTONCONSOLE and MILTONAPPLOG;
d) sets the threshold value on the "org.milton" logger to INFO to enable logging at INFO level.
e) Prevents duplication of output in standard and MILTON appenders by setting additivy="false" in the "org.milton" logger.
f) Creates a second nested logger that enables debug level output from packages starting "org.milton.services" to the same appenders as "org.milton".
If you are not seeing DEBUG level output, that is probably because your existing appenders have a threshold that disables DEBUG output.
This, or similar, should be used to replace conf/log4j.xml. I don't think that you can set up a separate configuration file, but you hardly need to when you can tweak the main configuration file by adding nested loggers at any level of granularity.
James