org.jlf.log
Class SecurityLog

java.lang.Object
  |
  +--org.jlf.log.SecurityLog

public class SecurityLog
extends java.lang.Object

SecurityLog wraps the Log class to log all security-related requests. It provides a singleton accessor, along with lots of handy class method {static} accessors.

See Also:
Log

Field Summary
protected static Log singleton
          Provides the class variable for the Singleton pattern, to keep track of the one and only instance of this class.
 
Constructor Summary
protected SecurityLog()
          Protect the default constructor, this class uses a Singleton pattern.
 
Method Summary
static void criticalError(java.lang.String logString)
          Logs a text string at CRITICAL_ERROR_LEVEL This method provides the implementation for a quick accessor to log a critical error, replacing typical calls to System.err.println().
static void detail(java.lang.String logString)
          Logs a text string at DETAIL_LEVEL
static void error(java.lang.String logString)
          Logs a text string at ERROR_LEVEL This method provides the implementation for a quick accessor to log a critical error, replacing typical calls to System.err.println().
static Log getInstance()
          Returns the singleton instance of this class.
static void info(java.lang.String logString)
          Logs a text string at INFO_LEVEL
static boolean isLoggingEnabledFor(int loggingLevel)
          Passthrough method to quick check if you should bother constructing a log message to log at a particular logging level.
static void logString(java.lang.String logString, int errorLevel)
          Logs a text string at the logging level specified.
static void trace(java.lang.String logString)
          Logs a text string at TRACE_LEVEL
static void warning(java.lang.String logString)
          Logs a text string at WARNING_LEVEL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

singleton

protected static Log singleton
Provides the class variable for the Singleton pattern, to keep track of the one and only instance of this class.

Constructor Detail

SecurityLog

protected SecurityLog()
Protect the default constructor, this class uses a Singleton pattern. If you need to access the Singleton instance of the class, DON'T make this public, instead use the getInstance() method!

Method Detail

getInstance

public static Log getInstance()
Returns the singleton instance of this class.


logString

public static void logString(java.lang.String logString,
                             int errorLevel)
Logs a text string at the logging level specified. This method is used when your code needs to parameterize the logging level. Otherwise you probably should use the err(), warning(), info(), detail(), or trace() methods below, they will be less verbose in your code.


criticalError

public static void criticalError(java.lang.String logString)
Logs a text string at CRITICAL_ERROR_LEVEL This method provides the implementation for a quick accessor to log a critical error, replacing typical calls to System.err.println().


error

public static void error(java.lang.String logString)
Logs a text string at ERROR_LEVEL This method provides the implementation for a quick accessor to log a critical error, replacing typical calls to System.err.println().


warning

public static void warning(java.lang.String logString)
Logs a text string at WARNING_LEVEL


info

public static void info(java.lang.String logString)
Logs a text string at INFO_LEVEL


detail

public static void detail(java.lang.String logString)
Logs a text string at DETAIL_LEVEL


trace

public static void trace(java.lang.String logString)
Logs a text string at TRACE_LEVEL


isLoggingEnabledFor

public static boolean isLoggingEnabledFor(int loggingLevel)
Passthrough method to quick check if you should bother constructing a log message to log at a particular logging level.