commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Cooper" <martin.coo...@tumbleweed.com>
Subject RE: [Logging] Configuring JDK 1.4 logging
Date Sun, 21 Jul 2002 05:33:30 GMT


> -----Original Message-----
> From: Craig R. McClanahan [mailto:craigmcc@apache.org]
> Sent: Saturday, July 20, 2002 9:06 AM
> To: Jakarta Commons Developers List
> Subject: Re: [Logging] Configuring JDK 1.4 logging
> 
> 
> 
> 
> On Fri, 19 Jul 2002, Martin Cooper wrote:
> 
> > Date: Fri, 19 Jul 2002 22:46:01 -0700
> > From: Martin Cooper <martin.cooper@tumbleweed.com>
> > Reply-To: Jakarta Commons Developers List 
> <commons-dev@jakarta.apache.org>
> > To: "'commons-dev@jakarta.apache.org'" 
> <commons-dev@jakarta.apache.org>
> > Subject: [Logging] Configuring JDK 1.4 logging
> >
> > OK, call me an idiot, but I just cannot seem to get Commons 
> Logging and JDK
> > 1.4 logging to log what I want logged. I understand that 
> Commons Logging
> > delegates to JDK 1.4 logging (in my particular case, since 
> I'm using JDK 1.4
> > but not Log4j), but nothing I do with logging.properties 
> files makes any
> > difference to what I see.
> >
> > According to the Commons Logging docs, if I'm using JDK 
> 1.4, and I don't
> > specify any other logging mechanism, then it will use JDK 
> 1.4 logging. This
> > much seems to work - I do see periodic INFO messages from 
> code I'm using.
> >
> > Getting more than INFO messages is where I seem to be stuck. My
> > interpretation of the Commons Logging docs is that I 
> shouldn't have to
> > configure anything for that, and that the only 
> configuration I should have
> > to do is for JDK 1.4 logging.
> >
> 
> There is an interesting setting that is relevant if you are using the
> default console handler (which I am) -- it sets the lowest 
> logging level
> that
> is recorded to the console, no matter what an individual logger wants:
> 
>   java.util.logging.ConsoleHandler.level = FINEST
> 
> (the default is INFO).  This is listed in the "Handler specific
> properties" of the default logging.properties file.

Yep, I already have this. It's in the file Costin referenced, and it's not
being picked up, even though the docs say it will be.

If I specify the file explicitly using what Calvin suggested, that works for
a command line app using JDK 1.4 explicitly. However, it doesn't work for,
for example, Struts sample apps, when I use either Resin 2.1.2 or Tomcat
4.0.4. Even if I specify the file to these using '-D', it still doesn't
work.

My logging.properties file looks like this (ignoring comments):

.level= FINEST
java.util.logging.ConsoleHandler.level = FINEST
java.util.logging.ConsoleHandler.formatter =
java.util.logging.SimpleFormatter
org.apache = FINEST

The way I understand it, I should get gobs of debug information for Struts,
Commons, etc. But all I see is INFO messages.

This is driving me nuts!

Anyone have any other ideas?

--
Martin Cooper


> 
> > However, I've created logging.properties files, per the JDK 
> 1.4 logging
> > docs, with the logging level turned up to FINEST for 
> everything, and still I
> > see nothing but the occasional INFO message. I've even 
> tried splattering
> > logging.properties files all over my disk in the hope that 
> I'll stumble
> > across the right location, and everything will start 
> working, but to no
> > avail.
> >
> > If there's someone out there who is successfully using 
> Commons Logging with
> > JDK 1.4 logging, I'd sure appreciate some hints and tips...
> >
> > Thanks!
> >
> > --
> > Martin Cooper
> >
> 
> Craig
> 
> 
> >
> > --
> > To unsubscribe, e-mail:   
> <mailto:commons-dev-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: 
> <mailto:commons-dev-help@jakarta.apache.org>
> >
> >
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:commons-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:commons-dev-help@jakarta.apache.org>
> 
> 


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message