Mantis - Resin
Viewing Issue Advanced Details
1187 minor always 06-07-06 07:46 06-26-06 18:41
ferg  
ferg  
normal  
closed  
fixed  
none    
none 3.0.20  
0001187: java.util.logging with sub-handlers
(rep by Andy Yates)

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?


Notes
(0001289)
ferg   
06-13-06 11:33   
The configuration is changing slightly to fix bugs with java.util.logging. The above example will still have some issues, instead, the configuration would look like

  <log name='' path='stdout:' level='all' 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"/>

In this case, "stdout:" gets any active logging.

The activity level is defined by the <logger>. So "org.springframework" prints only severe and above to "stdout:", while "uk.ac.sanger" prints fine and above to "stdout:".

If you wanted additional destination for "severe" logs, you could define

<log name="" level="severe" path="log/severe.log"/>

The <logger> would remain the same, but only severe log items would go to log/severe.log