[jboss-user] [JBoss AOP] - Re: New SystemOuts since upgrade to 2.0.0.GA with Jboss AS (
DerMas
do-not-reply at jboss.com
Tue Nov 25 05:17:04 EST 2008
I think I found the problem in the following class:
| package org.jboss.aop.util.logging;
|
| /**
| * A thin wrapper around the jboss logging framework, so that if a proper logger is not installed
| * we get the output redirected to System.out.
| *
| * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
| * @version $Revision: 1.1 $
| */
| public class AOPLogger{
|
So the javadoc says that the output is redirected to System.out. if not a proper logger is installed.
A quickfix was the following:
|
| private AOPLogger(final Class<?> clazz)
| {
| org.jboss.logging.Logger log;
| log = org.jboss.logging.Logger.getLogger(clazz);
| if(log.getLoggerPlugin().getClass().getName().equals( org.jboss.logging.NullLoggerPlugin.class.getName()))
| {
| //MY QUICKFIX: commented these two lines out
| //org.jboss.logging.Logger.setPluginClassName(SystemOutLoggerPlugin.class.getName());
| //log = org.jboss.logging.Logger.getLogger(clazz);
| }
|
| logger = log;
| }
|
And poof, the sysouts while executing my ejb were gone, but the debug sysouts while using the aopc precompile task were still there. Just as I want it.
But this is a very dirty fix directly in the jboss aop libs.. Isn't there another way to fix this problem?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192022#4192022
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192022
More information about the jboss-user
mailing list