logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kapil Anand <kapil...@yahoo.com>
Subject WARN Unrecognized element plugin (JULReceiver)
Date Wed, 12 Mar 2008 20:30:51 GMT

Resending after log4j mailing list registration, sorry if it is duplicate:

I am trying to use JUL Receiver with log4j 1.2.15
I have following on classpath:

log4j.xml defines the plugin after declaring the appenders and before
declaring the loggers:
<plugin name="julreceiver" class="org.apache.log4j.jul.JULReceiver" />

Another strange thing is, when I switched from category to logger element, I
see following warning as well:
log4j:WARN The content of element type "logger" must match
I have level element defined in each logger but appender-ref is missing,
since all will use the ref of root logger.

In the main class of the app I also added code suggested in another post:

public class RunMySpringApp
	private static final Object repositorySelectorGuard = new Object();
	private static final LoggerRepositoryExImpl repositoryExImpl = 
		new LoggerRepositoryExImpl(LogManager.getLoggerRepository());

	public static void main(String[] args)
		// HACK FOR log4j plugins to work
		RepositorySelector repositorySelector = new RepositorySelector()
			public LoggerRepository getLoggerRepository()
		             return repositoryExImpl;    


But I still get the WARN and all JUL logs show up on stderr/stdout in the
default INFO level. (the default behavior of JUL in absence of any JUL
config). Any help will be appreciated.

Could anyone please point me to some documentation or sample xml code that
provides help on how to use JULReceiver? Would defining a top level for the
JUL based classes redirect all it's children to log4j?

View this message in context: http://www.nabble.com/WARN-Unrecognized-element-plugin-%28JULReceiver%29-tp16012504p16012504.html
Sent from the Log4j - Users mailing list archive at Nabble.com.

To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message