I am trying to use JUL Receiver with log4j 1.2.15
<plugin name="julreceiver" class="org.apache.log4j.jul.JULReceiver" />
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;
}
};
LogManager.setRepositorySelector(repositorySelector,
repositorySelectorGuard);
RunSpringApp.main(args);
}
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.
Also:
Could you please point me to some documentation or sample 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?
thanks
--
View this message in context:
http://www.nabble.com/WARN-Unrecognized-element-plugin-tp16012504p16012504.html
Sent from the Log4j - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]