Anonymous | Login | Signup for a new account | 11-17-2024 00:46 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0001186 | [Resin] | minor | always | 06-07-06 07:35 | 06-13-06 11:04 | ||||
Reporter | ferg | View Status | public | ||||||
Assigned To | ferg | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | |||||||
Summary | 0001186: java.util.logging | ||||||||
Description |
(rep by MIchael Earl) 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. |
||||||||
Additional Information |
We have a LoggerManager class to wrap calls to Logger public class LoggerManager { static public Logger getLogger( Object object ) { return getLogger( object.getClass().getName() ); } static public Logger getLogger( String loggerName ) { String METHOD = "getLogger"; Logger logger = Logger.getLogger( loggerName ); // Don't add the handlers if logging is disabled. if( isLoggingEnabled() ) { // Add handlers to the logger if ( logger.getHandlers() == null || logger.getHandlers().length == 0 ) { try { if ( (loggingMode & MULTICAST_LOGGING) == MULTICAST_LOGGING ) { logger.addHandler( new LogHandler() ); } if ( (loggingMode & STDERR_LOGGING) == STDERR_LOGGING ) { logger.addHandler( new StderrHandler() ); } } catch ( Exception e ) { System.err.println( "Error adding LogHandler() to the logger: " + e.getMessage() ); } } // WE do dot want to propogate any messages or the system logger will output to the console logger.setUseParentHandlers( false ); } return logger; } } So we do something like this: Logger logger = LoggerManager.getLogger( this ); This is essentially what you do below. However, we do not use the "shortcut" methods like logger.fine(), logger.finest() excepting entering() and exiting(). We always user logger.logp() or logger.entering(), logger,exiting(). |
||||||||
Attached Files | |||||||||
|
Notes | |
(0001288) ferg 06-13-06 11:04 |
server/024n The new configuration will also help <logger name="com.hp.sfng" level="fine"/> |
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
30 total queries executed. 26 unique queries executed. |