com.rhi.architecture.logging
Class DefaultLogger

java.lang.Object
  extended bycom.rhi.architecture.logging.Logger
      extended bycom.rhi.architecture.logging.DefaultLogger
All Implemented Interfaces:
Resource

public class DefaultLogger
extends Logger

This class exists so that if the Log initialization fails, there is some way to write messages about what happened.

Version:
1.0
Author:
Pete McKinstry

Field Summary
 
Fields inherited from class com.rhi.architecture.logging.Logger
DEFAULT_CATEGORY, KEY
 
Constructor Summary
DefaultLogger()
          Constructor for DefaultLogger.
 
Method Summary
 void close()
          Perform whatever cleanup is required of the underlying object..
 void debug(java.lang.String message)
          Log a message w/ a debug priority.
 void error(java.lang.String message)
          Log a message w/ an error priority.
 void error(java.lang.String message, java.lang.Throwable t)
          Log a message w/ an error priority.
 void fatal(java.lang.String message)
          Log a message w/ a fatal priority.
 void fatal(java.lang.String message, java.lang.Throwable t)
          Log a message w/ a fatal priority.
 void info(java.lang.String message)
          Log a message w/ an informational priority.
 void init(java.util.Properties p)
          init()
 boolean isDebugEnabled()
          Check whether this category is enabled for the DEBUG Level.
 boolean isInfoEnabled()
          Check whether this category is enabled for the INFO Level.
 boolean isTraceEnabled()
          Check whether this category is enabled for the TRACE Level.
 boolean isWarningEnabled()
          Check whether this category is enabled for the WARNING Level.
 void trace(java.lang.String message)
          Log a message w/ a trace priority.
 void warning(java.lang.String message)
          Log a message w/ a warning priority.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLogger

public DefaultLogger()
Constructor for DefaultLogger.

Method Detail

init

public void init(java.util.Properties p)
          throws InitializationException
init()

Specified by:
init in interface Resource
Specified by:
init in class Logger
Parameters:
p -
Throws:
InitializationException
See Also:
Resource.init(java.util.Properties)

close

public void close()
Description copied from class: Logger
Perform whatever cleanup is required of the underlying object..

Specified by:
close in interface Resource
Specified by:
close in class Logger
See Also:
Resource.close()

fatal

public void fatal(java.lang.String message)
Description copied from class: Logger
Log a message w/ a fatal priority. Fatal messages are usually not recoverable & will precede an application shutdown. Actual support for this priority is log implementation specific, but should be available in most packages. (e.g. Log4J, JDK1.4)

Specified by:
fatal in class Logger
Parameters:
message -
See Also:
Logger.fatal(String)

fatal

public void fatal(java.lang.String message,
                  java.lang.Throwable t)
Description copied from class: Logger
Log a message w/ a fatal priority. Fatal messages are usually not recoverable & will precede an application shutdown. Actual support for this priority is log implementation specific, but should be available in most packages. (e.g. Log4J, JDK1.4)

Specified by:
fatal in class Logger
Parameters:
message -
t -
See Also:
com.rhi.architecture.logging.Logger#fatal(String, Exception)

error

public void error(java.lang.String message)
Description copied from class: Logger
Log a message w/ an error priority. Errors are used for problems found during processing that are not fatal. Actual support for this priority is log implementation specific, but should be available in most packages. (e.g. Log4J, JDK1.4)

Specified by:
error in class Logger
Parameters:
message -
See Also:
Logger.error(String)

error

public void error(java.lang.String message,
                  java.lang.Throwable t)
Description copied from class: Logger
Log a message w/ an error priority. Errors are used for problems found during processing that are not fatal. Actual support for this priority is log implementation specific, but should be available in most packages. (e.g. Log4J, JDK1.4)

Specified by:
error in class Logger
Parameters:
message -
t -
See Also:
com.rhi.architecture.logging.Logger#error(String, Exception)

warning

public void warning(java.lang.String message)
Description copied from class: Logger
Log a message w/ a warning priority. Warnings are useful for messages that signal an error in the future if not corrected. (e.g. low disk space) or potential errors that may not be a problem depending on context that the logging component does not have. Actual support for this priority is log implementation specific, but should be available in most packages. (e.g. Log4J, JDK1.4)

Specified by:
warning in class Logger
Parameters:
message -
See Also:
Logger.warning(String)

isWarningEnabled

public boolean isWarningEnabled()
Description copied from class: Logger
Check whether this category is enabled for the WARNING Level.

Specified by:
isWarningEnabled in class Logger
Returns:
boolean
See Also:
Logger.isWarningEnabled()

info

public void info(java.lang.String message)
Description copied from class: Logger
Log a message w/ an informational priority. Informational messages will include things like operational statistics, which are nice to have, but don't signal an error of any kind in the application. The number of informational messages used in a process should be very low. Actual support for this priority is log implementation specific, but should be available in most packages. (e.g. Log4J, JDK1.4)

Specified by:
info in class Logger
Parameters:
message -
See Also:
Logger.info(String)

isInfoEnabled

public boolean isInfoEnabled()
Description copied from class: Logger
Check whether this category is enabled for the INFO Level.

Specified by:
isInfoEnabled in class Logger
Returns:
boolean
See Also:
Logger.isInfoEnabled()

debug

public void debug(java.lang.String message)
Description copied from class: Logger
Log a message w/ a debug priority. Debug messages are normally be disabled in production environments, but can be quite useful during development.

Specified by:
debug in class Logger
Parameters:
message -
See Also:
Logger.debug(String)

isDebugEnabled

public boolean isDebugEnabled()
Description copied from class: Logger
Check whether this category is enabled for the DEBUG Level.

Specified by:
isDebugEnabled in class Logger
Returns:
boolean
See Also:
Logger.isDebugEnabled()

trace

public void trace(java.lang.String message)
Description copied from class: Logger
Log a message w/ a trace priority. Trace messages are the most granular and will normally be disabled in production environments, but can be quite useful during development. If the underlying logging implementation does not support this level, trace messages should be logged w/ the most verbose logging level available.

Specified by:
trace in class Logger
Parameters:
message -
See Also:
Logger.trace(String)

isTraceEnabled

public boolean isTraceEnabled()
Description copied from class: Logger
Check whether this category is enabled for the TRACE Level.

Specified by:
isTraceEnabled in class Logger
Returns:
boolean
See Also:
Logger.isTraceEnabled()


Copyright © 2002-2004 Robert Half International. All Rights Reserved.