Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001184 [Resin] minor always 06-06-06 10:58 06-27-06 08:53
Reporter ferg View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version
Summary 0001184: log level in ErrorPageManager
Description (rep by Bill Au)

It looks like only certain exceptions (like CompileException) is
logged at the warning level. Everything else is logged at fine.
Shouldn't all exceptions be logged at the warning level?

Additional Information
Attached Files

- Relationships

- Notes
(0001270)
ferg
06-07-06 07:33

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().
 

- Issue History
Date Modified Username Field Change
06-06-06 10:58 ferg New Issue
06-07-06 07:33 ferg Note Added: 0001270
06-27-06 08:53 ferg Assigned To  => ferg
06-27-06 08:53 ferg Status new => closed
06-27-06 08:53 ferg Resolution open => fixed
06-27-06 08:53 ferg Fixed in Version  => 3.0.20


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
28 total queries executed.
25 unique queries executed.
Powered by Mantis Bugtracker