RE: Issues with java.util.logging
"Earl, Michael" <[email protected]> Wed, 7 Jun 2006 08:03:38 -0700
| Newsgroups | gmane.text.xml.resin.user |
|---|---|
| Message-ID | <96ECC502D2678A4192F48386A524718D04E2B6D3@cacexc07.americas.cpqcorp.net> |
Another symptom: We have the ability to control the log levels dynamically by modifying a config file. This config file gets read every 30 seconds to check for changes. By default we do not have the config file at all which was the case with our Resin implementation. In order to try to investigate our logging issues I was able to set the logging level to INFO for specific classes. However, entries that apply to a namesspace like our "com.hp.sfng" the changes do not take effect. In other words, when I try to set he logging level to INFO with "com.hp.sfng = INFO" this does not work. Now, normal in our java application and our web code running under Tomcat, setting the log level in this fasion has always worked in the past. Thanks for any help. Mike. ________________________________ From: Earl, Michael Sent: Wednesday, June 07, 2006 7:31 AM To: '[email protected]' Subject: RE: Issues with java.util.logging In our code, we already call logger.setUseParentHandlers( false ). Any ideas why full logging would be enabled by default? ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of Bill Au Sent: Wednesday, June 07, 2006 5:53 AM To: [email protected] Subject: Re: Issues with java.util.logging The only problem we have seen with sub declaration is when logging is turned off at a sub level, the default will override that. We solved that problem by adding use-parent-handers='false' to <logger>. Bill On 6/7/06, Andy Yates <[email protected]> wrote: I've had similar problems with the resin logging levels in that it just ignores any kind of sub declaration of logging. For instance I had the following levels setup: <log path='stdout:' timestamp='[%H:%M:%S.%s] '> <logger name="" level="info"/> <logger name="org.springframework" level="severe"/> <logger name="org.apache" level="severe"/> <logger name="uk.ac.sanger" level="fine"/> </log> The last one is my own code so the log levels should be fairly verbose for a test system. All calls to the logger are going through commons-log and I even forced commons log to send to the Jdk1.4 logger. None of this worked so I was left with using log4j & getting it to append to stdout which seems to have done the trick but it is by no way ideal. Anyone else encountered this problem? Cheers, Andy Earl, Michael wrote: > Hello All, > > We recently migrated from Tomcat to Resin. We are now discovering that > for some reason ALL of our classes are creating log messages at ALL > levels. This did not happen nor does it still happen with Tomcat -- > with the same code. We love Resin by the way so this is not a > complaint. I am seeking to understand why this is happening. I have > added the following to our resin config file: > > <logger name="com.hp.sfng" level="info" path='stdout:' > timestamp='[%H:%M:%S.%s] '/> > > This had no effect, all classes are sending log messages. > > Thanks for any help, > > Mike. > > --------------------------------------------------- > Michael Earl "For whoever exalts > Software Engineer himself will be humbled, > GO-IT MBP/SF and whoever humbles > Bldg R4 himself will be exalted." > HP, Roseville CA > +1-916-748-7958 work Matthew 23:12 > +1-916-671-4466 cell > --------------------------------------------------- > >