com.codemonster.surinam.core.services.impl
Class StandardLogger

java.lang.Object
  extended by com.codemonster.surinam.core.services.impl.StandardLogger
All Implemented Interfaces:
Logger

public class StandardLogger
extends Object
implements Logger

This class wraps a standard logger in order to allow code to consume a formal interface.


Constructor Summary
StandardLogger(String name)
           
StandardLogger(String name, String resourceBundleName)
          Method to construct a logger for a named subsystem.
 
Method Summary
 ResourceBundle getResourceBundle()
           
 String getResourceBundleName()
           
 void log(Level level, String msg)
           
 void log(Level level, String msg, Object param)
           
 void log(Level level, String msg, Object[] params)
           
 void log(Level level, String sourceClass, String sourceMethod, String msg)
           
 void log(Level level, String sourceClass, String sourceMethod, String msg, Object param)
           
 void log(Level level, String sourceClass, String sourceMethod, String msg, Object[] params)
           
 void log(Level level, String sourceClass, String sourceMethod, String msg, Throwable thrown)
           
 void log(Level level, String msg, Throwable thrown)
           
 void throwing(String sourceClass, String sourceMethod, Throwable thrown)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardLogger

public StandardLogger(String name)

StandardLogger

public StandardLogger(String name,
                      String resourceBundleName)
Method to construct a logger for a named subsystem.

The logger will be initially configured with a null Level and with useParentHandlers true.

Parameters:
resourceBundleName - name of ResourceBundle to be used for localizing messages for this logger. May be null if none of the messages require localization.
name - A name for the logger. This should be a dot-separated name and should normally be based on the package name or class name of the subsystem, such as java.net or javax.swing. It may be null for anonymous Loggers.
Throws:
MissingResourceException - if the ResourceBundleName is non-null and no corresponding resource can be found.
Method Detail

log

public void log(Level level,
                String msg)
Specified by:
log in interface Logger

log

public void log(Level level,
                String msg,
                Object param)
Specified by:
log in interface Logger

log

public void log(Level level,
                String msg,
                Object[] params)
Specified by:
log in interface Logger

log

public void log(Level level,
                String msg,
                Throwable thrown)
Specified by:
log in interface Logger

log

public void log(Level level,
                String sourceClass,
                String sourceMethod,
                String msg)
Specified by:
log in interface Logger

log

public void log(Level level,
                String sourceClass,
                String sourceMethod,
                String msg,
                Object param)
Specified by:
log in interface Logger

log

public void log(Level level,
                String sourceClass,
                String sourceMethod,
                String msg,
                Object[] params)
Specified by:
log in interface Logger

log

public void log(Level level,
                String sourceClass,
                String sourceMethod,
                String msg,
                Throwable thrown)
Specified by:
log in interface Logger

throwing

public void throwing(String sourceClass,
                     String sourceMethod,
                     Throwable thrown)
Specified by:
throwing in interface Logger

getResourceBundle

public ResourceBundle getResourceBundle()

getResourceBundleName

public String getResourceBundleName()


Copyright © 2010. All Rights Reserved.