You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Jason Dillon <ja...@planet57.com> on 2006/08/28 11:26:06 UTC

Anyone know how to make the kernel tests be quiet?

These tests make way... way to much noise.

Anyone know how to make them shut up?

--jason

Re: Re: Anyone know how to make the kernel tests be quiet?

Posted by Jason Dillon <ja...@planet57.com>.
Looks like logging-config is not getting picked up as I had
expected... going to need to write a custom goal that will install the
logging configuration into target/test-classes so that it gets pick up
first.

--jason


On 8/28/06, Jason Dillon <ja...@planet57.com> wrote:
> Thats odd, because the default logging config is set to only allow
> WARN and ERROR to go to console, not DEBUG.
>
> Do these tests need to:
>
>      GeronimoLogging.initialize(GeronimoLogging.INFO);
>
> Or something?
>
> --jason
>
>
> On Aug 28, 2006, at 10:14 AM, Dain Sundstrom wrote:
>
> > Not me.  They were quiet before the m2 change but it looks like
> > logging got turned up.
> >
> > -dain
> >
> > On Aug 28, 2006, at 2:26 AM, Jason Dillon wrote:
> >
> >> These tests make way... way to much noise.
> >>
> >> Anyone know how to make them shut up?
> >>
> >> --jason
> >
>
>

Re: Anyone know how to make the kernel tests be quiet?

Posted by Jason Dillon <ja...@planet57.com>.
Ya, I'm not sure that surefire has support for that :-(

--jason


On Aug 31, 2006, at 6:35 AM, anita kulshreshtha wrote:

>     In M1 there was a way to say swallow ouput. I can not find a
> reference to it. But trying..
>
> Thanks
> Anita
>
> --- Jason Dillon <ja...@planet57.com> wrote:
>>>>>> I'm not sure how they were quiet before m2 with code like above
>>
>>>>>> in setUp().
>>>>>>
>>>>>> --jason
>>>>>>
>>>>>>
>>>>>> On Aug 28, 2006, at 4:29 PM, Jason Dillon wrote:
>>>>>>
>>>>>>> Thats odd, because the default logging config is set to only
>>>>>>> allow WARN and ERROR to go to console, not DEBUG.
>>>>>>>
>>>>>>> Do these tests need to:
>>>>>>>
>>>>>>>     GeronimoLogging.initialize(GeronimoLogging.INFO);
>>>>>>>
>>>>>>> Or something?
>>>>>>>
>>>>>>> --jason
>>>>>>>
>>>>>>>
>>>>>>> On Aug 28, 2006, at 10:14 AM, Dain Sundstrom wrote:
>>>>>>>
>>>>>>>> Not me.  They were quiet before the m2 change but it looks
>>>>>>>> like logging got turned up.
>>>>>>>>
>>>>>>>> -dain
>>>>>>>>
>>>>>>>> On Aug 28, 2006, at 2:26 AM, Jason Dillon wrote:
>>>>>>>>
>>>>>>>>> These tests make way... way to much noise.
>>>>>>>>>
>>>>>>>>> Anyone know how to make them shut up?
>>>>>>>>>
>>>>>>>>> --jason
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>
>>
>>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com


Re: Anyone know how to make the kernel tests be quiet?

Posted by anita kulshreshtha <a_...@yahoo.com>.
    In M1 there was a way to say swallow ouput. I can not find a
reference to it. But trying..

Thanks
Anita

--- Jason Dillon <ja...@planet57.com> wrote:
> >>>> I'm not sure how they were quiet before m2 with code like above 
> 
> >>>> in setUp().
> >>>>
> >>>> --jason
> >>>>
> >>>>
> >>>> On Aug 28, 2006, at 4:29 PM, Jason Dillon wrote:
> >>>>
> >>>>> Thats odd, because the default logging config is set to only  
> >>>>> allow WARN and ERROR to go to console, not DEBUG.
> >>>>>
> >>>>> Do these tests need to:
> >>>>>
> >>>>>     GeronimoLogging.initialize(GeronimoLogging.INFO);
> >>>>>
> >>>>> Or something?
> >>>>>
> >>>>> --jason
> >>>>>
> >>>>>
> >>>>> On Aug 28, 2006, at 10:14 AM, Dain Sundstrom wrote:
> >>>>>
> >>>>>> Not me.  They were quiet before the m2 change but it looks  
> >>>>>> like logging got turned up.
> >>>>>>
> >>>>>> -dain
> >>>>>>
> >>>>>> On Aug 28, 2006, at 2:26 AM, Jason Dillon wrote:
> >>>>>>
> >>>>>>> These tests make way... way to much noise.
> >>>>>>>
> >>>>>>> Anyone know how to make them shut up?
> >>>>>>>
> >>>>>>> --jason
> >>>>>>
> >>>>>
> >>>>
> >>>
> >
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Anyone know how to make the kernel tests be quiet?

Posted by Jason Dillon <ja...@planet57.com>.
I think this is related to the custom log4j bits on geronimo-kernel,  
which most modules depend on.  Modules that do not depend on geronimo- 
kernel, like geronimo-util and geronimo-activation behave as I would  
expect.

I'm gonna dig into it more, and will probably add a custom sys prop  
to disable the kernel's logging bits, so that we can set that for  
tests and thus get tests to use one log4j configuration.  Though, I'd  
imagine that it this is done in a static, that other projects that  
use G components that also depend on geronimo-kernel will also end up  
with some additional log4j configuration that is unwanted.

I don't want to start up a logging debate... so I think the optional  
disable the kernels default should be fine to get test logging back  
to normal, producing little console output and full debug to target/ 
test.log.

--jason


On Aug 30, 2006, at 4:50 PM, Dain Sundstrom wrote:

> You should be able to turn on debugging, add a break point in the  
> logging code and see which test is causing the problem.
>
> -dain
>
> On Aug 30, 2006, at 4:31 PM, Jason Dillon wrote:
>
>> Looks like there is more going on which is causing tests to use  
>> some additional configuration for tests...
>>
>> Specifically, looks like something else is installing a  
>> ConsoleAppender... as if I comment out the CONSOLE definition from  
>> logging-config, then I still get console output.
>>
>> I'm also seeing that something is setting the root logger's  
>> level... as I've got the root configured to use DEBUG, but that  
>> will not output DEBUG logs to the test.log as I would expect.  I  
>> have to explicitly configure org.apache.geronimo to use DEBUG, and  
>> then I see the logs in test.log... but now with some rouge  
>> ConsoleAppender it spits out a bunch of junk to the console.
>>
>> Highly frustrating... :-(
>>
>> --jason
>>
>>
>> On Aug 30, 2006, at 3:53 PM, Jason Dillon wrote:
>>
>>> This is fixed now... though it still spits out a few ERROR logs,  
>>> which I am hoping are expected from the test...
>>>
>>> --jason
>>>
>>>
>>> On Aug 30, 2006, at 3:49 PM, Jason Dillon wrote:
>>>
>>>> Um... looks like a few of these tests are explicitly enabling  
>>>> DEBUG and installing a ConsoleAppender...
>>>>
>>>>     Logger.getRootLogger().addAppender(new ConsoleAppender(new  
>>>> PatternLayout("%p [%t] %m %n")));
>>>>     Logger.getRootLogger().setLevel(Level.DEBUG);
>>>>
>>>> I'm not sure how they were quiet before m2 with code like above  
>>>> in setUp().
>>>>
>>>> --jason
>>>>
>>>>
>>>> On Aug 28, 2006, at 4:29 PM, Jason Dillon wrote:
>>>>
>>>>> Thats odd, because the default logging config is set to only  
>>>>> allow WARN and ERROR to go to console, not DEBUG.
>>>>>
>>>>> Do these tests need to:
>>>>>
>>>>>     GeronimoLogging.initialize(GeronimoLogging.INFO);
>>>>>
>>>>> Or something?
>>>>>
>>>>> --jason
>>>>>
>>>>>
>>>>> On Aug 28, 2006, at 10:14 AM, Dain Sundstrom wrote:
>>>>>
>>>>>> Not me.  They were quiet before the m2 change but it looks  
>>>>>> like logging got turned up.
>>>>>>
>>>>>> -dain
>>>>>>
>>>>>> On Aug 28, 2006, at 2:26 AM, Jason Dillon wrote:
>>>>>>
>>>>>>> These tests make way... way to much noise.
>>>>>>>
>>>>>>> Anyone know how to make them shut up?
>>>>>>>
>>>>>>> --jason
>>>>>>
>>>>>
>>>>
>>>
>


Re: Anyone know how to make the kernel tests be quiet?

Posted by Jason Dillon <ja...@planet57.com>.
Okay, I think I've found it... BootstrapLog4jLog and  
BootstrapJdk1.4Log both have static blocks that install logging  
configuration programatically.

I'm going to add a new method to GeronimoLogging, which will check if  
this behavior is enabled or not:

     /**
      * Check if the Geronimo bootstrap logging initialization is  
enabled.
      *
      * <p>Checks the system property  
<tt>geronimo.bootstrap.logging.enabled</tt>
      * if not set, or set to "true" then bootstrap logging  
initialization is enabled.
      *
      * @return  True of bootstrap logging initialization is enabled.
      */
     public static boolean isBootstrapLoggingInitializationEnabled() {
         String value = System.getProperty 
("geronimo.bootstrap.logging.enabled");
         if (value == null) {
             return true;
         }
         else {
             return Boolean.valueOf(value).booleanValue();
         }
     }

And then wrap the static blocks in the Log impls to only execute if  
isBootstrapLoggingInitializationEnabled() returns true.

Then to hook up, I'm going to specify - 
Dgeronimo.bootstrap.logging.enabled=false to the argLine in project- 
config.

This should leave things as per normal for running the server, and  
still allow the tests to be run from a single log4j logging  
configuration.  After this, target/test.log should contain DEBUG  
level messages for the tests run, and only ERROR+ will get written to  
console.

I'm going to double check... no triple check that this does not alter  
the servers logging and then commit.

--jason


On Aug 30, 2006, at 4:50 PM, Dain Sundstrom wrote:

> You should be able to turn on debugging, add a break point in the  
> logging code and see which test is causing the problem.
>
> -dain
>
> On Aug 30, 2006, at 4:31 PM, Jason Dillon wrote:
>
>> Looks like there is more going on which is causing tests to use  
>> some additional configuration for tests...
>>
>> Specifically, looks like something else is installing a  
>> ConsoleAppender... as if I comment out the CONSOLE definition from  
>> logging-config, then I still get console output.
>>
>> I'm also seeing that something is setting the root logger's  
>> level... as I've got the root configured to use DEBUG, but that  
>> will not output DEBUG logs to the test.log as I would expect.  I  
>> have to explicitly configure org.apache.geronimo to use DEBUG, and  
>> then I see the logs in test.log... but now with some rouge  
>> ConsoleAppender it spits out a bunch of junk to the console.
>>
>> Highly frustrating... :-(
>>
>> --jason
>>
>>
>> On Aug 30, 2006, at 3:53 PM, Jason Dillon wrote:
>>
>>> This is fixed now... though it still spits out a few ERROR logs,  
>>> which I am hoping are expected from the test...
>>>
>>> --jason
>>>
>>>
>>> On Aug 30, 2006, at 3:49 PM, Jason Dillon wrote:
>>>
>>>> Um... looks like a few of these tests are explicitly enabling  
>>>> DEBUG and installing a ConsoleAppender...
>>>>
>>>>     Logger.getRootLogger().addAppender(new ConsoleAppender(new  
>>>> PatternLayout("%p [%t] %m %n")));
>>>>     Logger.getRootLogger().setLevel(Level.DEBUG);
>>>>
>>>> I'm not sure how they were quiet before m2 with code like above  
>>>> in setUp().
>>>>
>>>> --jason
>>>>
>>>>
>>>> On Aug 28, 2006, at 4:29 PM, Jason Dillon wrote:
>>>>
>>>>> Thats odd, because the default logging config is set to only  
>>>>> allow WARN and ERROR to go to console, not DEBUG.
>>>>>
>>>>> Do these tests need to:
>>>>>
>>>>>     GeronimoLogging.initialize(GeronimoLogging.INFO);
>>>>>
>>>>> Or something?
>>>>>
>>>>> --jason
>>>>>
>>>>>
>>>>> On Aug 28, 2006, at 10:14 AM, Dain Sundstrom wrote:
>>>>>
>>>>>> Not me.  They were quiet before the m2 change but it looks  
>>>>>> like logging got turned up.
>>>>>>
>>>>>> -dain
>>>>>>
>>>>>> On Aug 28, 2006, at 2:26 AM, Jason Dillon wrote:
>>>>>>
>>>>>>> These tests make way... way to much noise.
>>>>>>>
>>>>>>> Anyone know how to make them shut up?
>>>>>>>
>>>>>>> --jason
>>>>>>
>>>>>
>>>>
>>>
>


Re: Anyone know how to make the kernel tests be quiet?

Posted by Dain Sundstrom <da...@iq80.com>.
You should be able to turn on debugging, add a break point in the  
logging code and see which test is causing the problem.

-dain

On Aug 30, 2006, at 4:31 PM, Jason Dillon wrote:

> Looks like there is more going on which is causing tests to use  
> some additional configuration for tests...
>
> Specifically, looks like something else is installing a  
> ConsoleAppender... as if I comment out the CONSOLE definition from  
> logging-config, then I still get console output.
>
> I'm also seeing that something is setting the root logger's  
> level... as I've got the root configured to use DEBUG, but that  
> will not output DEBUG logs to the test.log as I would expect.  I  
> have to explicitly configure org.apache.geronimo to use DEBUG, and  
> then I see the logs in test.log... but now with some rouge  
> ConsoleAppender it spits out a bunch of junk to the console.
>
> Highly frustrating... :-(
>
> --jason
>
>
> On Aug 30, 2006, at 3:53 PM, Jason Dillon wrote:
>
>> This is fixed now... though it still spits out a few ERROR logs,  
>> which I am hoping are expected from the test...
>>
>> --jason
>>
>>
>> On Aug 30, 2006, at 3:49 PM, Jason Dillon wrote:
>>
>>> Um... looks like a few of these tests are explicitly enabling  
>>> DEBUG and installing a ConsoleAppender...
>>>
>>>     Logger.getRootLogger().addAppender(new ConsoleAppender(new  
>>> PatternLayout("%p [%t] %m %n")));
>>>     Logger.getRootLogger().setLevel(Level.DEBUG);
>>>
>>> I'm not sure how they were quiet before m2 with code like above  
>>> in setUp().
>>>
>>> --jason
>>>
>>>
>>> On Aug 28, 2006, at 4:29 PM, Jason Dillon wrote:
>>>
>>>> Thats odd, because the default logging config is set to only  
>>>> allow WARN and ERROR to go to console, not DEBUG.
>>>>
>>>> Do these tests need to:
>>>>
>>>>     GeronimoLogging.initialize(GeronimoLogging.INFO);
>>>>
>>>> Or something?
>>>>
>>>> --jason
>>>>
>>>>
>>>> On Aug 28, 2006, at 10:14 AM, Dain Sundstrom wrote:
>>>>
>>>>> Not me.  They were quiet before the m2 change but it looks like  
>>>>> logging got turned up.
>>>>>
>>>>> -dain
>>>>>
>>>>> On Aug 28, 2006, at 2:26 AM, Jason Dillon wrote:
>>>>>
>>>>>> These tests make way... way to much noise.
>>>>>>
>>>>>> Anyone know how to make them shut up?
>>>>>>
>>>>>> --jason
>>>>>
>>>>
>>>
>>


Re: Anyone know how to make the kernel tests be quiet?

Posted by Jason Dillon <ja...@planet57.com>.
Looks like there is more going on which is causing tests to use some  
additional configuration for tests...

Specifically, looks like something else is installing a  
ConsoleAppender... as if I comment out the CONSOLE definition from  
logging-config, then I still get console output.

I'm also seeing that something is setting the root logger's level...  
as I've got the root configured to use DEBUG, but that will not  
output DEBUG logs to the test.log as I would expect.  I have to  
explicitly configure org.apache.geronimo to use DEBUG, and then I see  
the logs in test.log... but now with some rouge ConsoleAppender it  
spits out a bunch of junk to the console.

Highly frustrating... :-(

--jason


On Aug 30, 2006, at 3:53 PM, Jason Dillon wrote:

> This is fixed now... though it still spits out a few ERROR logs,  
> which I am hoping are expected from the test...
>
> --jason
>
>
> On Aug 30, 2006, at 3:49 PM, Jason Dillon wrote:
>
>> Um... looks like a few of these tests are explicitly enabling  
>> DEBUG and installing a ConsoleAppender...
>>
>>     Logger.getRootLogger().addAppender(new ConsoleAppender(new  
>> PatternLayout("%p [%t] %m %n")));
>>     Logger.getRootLogger().setLevel(Level.DEBUG);
>>
>> I'm not sure how they were quiet before m2 with code like above in  
>> setUp().
>>
>> --jason
>>
>>
>> On Aug 28, 2006, at 4:29 PM, Jason Dillon wrote:
>>
>>> Thats odd, because the default logging config is set to only  
>>> allow WARN and ERROR to go to console, not DEBUG.
>>>
>>> Do these tests need to:
>>>
>>>     GeronimoLogging.initialize(GeronimoLogging.INFO);
>>>
>>> Or something?
>>>
>>> --jason
>>>
>>>
>>> On Aug 28, 2006, at 10:14 AM, Dain Sundstrom wrote:
>>>
>>>> Not me.  They were quiet before the m2 change but it looks like  
>>>> logging got turned up.
>>>>
>>>> -dain
>>>>
>>>> On Aug 28, 2006, at 2:26 AM, Jason Dillon wrote:
>>>>
>>>>> These tests make way... way to much noise.
>>>>>
>>>>> Anyone know how to make them shut up?
>>>>>
>>>>> --jason
>>>>
>>>
>>
>


Re: Anyone know how to make the kernel tests be quiet?

Posted by Jason Dillon <ja...@planet57.com>.
This is fixed now... though it still spits out a few ERROR logs,  
which I am hoping are expected from the test...

--jason


On Aug 30, 2006, at 3:49 PM, Jason Dillon wrote:

> Um... looks like a few of these tests are explicitly enabling DEBUG  
> and installing a ConsoleAppender...
>
>     Logger.getRootLogger().addAppender(new ConsoleAppender(new  
> PatternLayout("%p [%t] %m %n")));
>     Logger.getRootLogger().setLevel(Level.DEBUG);
>
> I'm not sure how they were quiet before m2 with code like above in  
> setUp().
>
> --jason
>
>
> On Aug 28, 2006, at 4:29 PM, Jason Dillon wrote:
>
>> Thats odd, because the default logging config is set to only allow  
>> WARN and ERROR to go to console, not DEBUG.
>>
>> Do these tests need to:
>>
>>     GeronimoLogging.initialize(GeronimoLogging.INFO);
>>
>> Or something?
>>
>> --jason
>>
>>
>> On Aug 28, 2006, at 10:14 AM, Dain Sundstrom wrote:
>>
>>> Not me.  They were quiet before the m2 change but it looks like  
>>> logging got turned up.
>>>
>>> -dain
>>>
>>> On Aug 28, 2006, at 2:26 AM, Jason Dillon wrote:
>>>
>>>> These tests make way... way to much noise.
>>>>
>>>> Anyone know how to make them shut up?
>>>>
>>>> --jason
>>>
>>
>


Re: Anyone know how to make the kernel tests be quiet?

Posted by Jason Dillon <ja...@planet57.com>.
Um... looks like a few of these tests are explicitly enabling DEBUG  
and installing a ConsoleAppender...

     Logger.getRootLogger().addAppender(new ConsoleAppender(new  
PatternLayout("%p [%t] %m %n")));
     Logger.getRootLogger().setLevel(Level.DEBUG);

I'm not sure how they were quiet before m2 with code like above in  
setUp().

--jason


On Aug 28, 2006, at 4:29 PM, Jason Dillon wrote:

> Thats odd, because the default logging config is set to only allow  
> WARN and ERROR to go to console, not DEBUG.
>
> Do these tests need to:
>
>     GeronimoLogging.initialize(GeronimoLogging.INFO);
>
> Or something?
>
> --jason
>
>
> On Aug 28, 2006, at 10:14 AM, Dain Sundstrom wrote:
>
>> Not me.  They were quiet before the m2 change but it looks like  
>> logging got turned up.
>>
>> -dain
>>
>> On Aug 28, 2006, at 2:26 AM, Jason Dillon wrote:
>>
>>> These tests make way... way to much noise.
>>>
>>> Anyone know how to make them shut up?
>>>
>>> --jason
>>
>


Re: Anyone know how to make the kernel tests be quiet?

Posted by Jason Dillon <ja...@planet57.com>.
Thats odd, because the default logging config is set to only allow  
WARN and ERROR to go to console, not DEBUG.

Do these tests need to:

     GeronimoLogging.initialize(GeronimoLogging.INFO);

Or something?

--jason


On Aug 28, 2006, at 10:14 AM, Dain Sundstrom wrote:

> Not me.  They were quiet before the m2 change but it looks like  
> logging got turned up.
>
> -dain
>
> On Aug 28, 2006, at 2:26 AM, Jason Dillon wrote:
>
>> These tests make way... way to much noise.
>>
>> Anyone know how to make them shut up?
>>
>> --jason
>


Re: Anyone know how to make the kernel tests be quiet?

Posted by Dain Sundstrom <da...@iq80.com>.
Not me.  They were quiet before the m2 change but it looks like  
logging got turned up.

-dain

On Aug 28, 2006, at 2:26 AM, Jason Dillon wrote:

> These tests make way... way to much noise.
>
> Anyone know how to make them shut up?
>
> --jason