org.omus.core
Class LogManager

java.lang.Object
  |
  +--org.omus.core.LogManager

public class LogManager
extends java.lang.Object

Contains methods to create custom log entries in the logging table on the server.

The object uses four different log-levels: DEBUG, INFO, WARN and ERROR. A log-level is an indication of the importance of a message. Depending on the mininum log-level you specified for the <extensions>-node in the logging section in config.xml a log entry might be ignored or written to the database.

If the configuration looks like this

     <extensions  level="warn" />
 
all log entries of level WARN or higher will be written to the database (or to a file, depending on the configuration). Accordingly calling one of the debug or info methods in LogManager will be ignored in this case.


Method Summary
 void debug(java.lang.String errCode)
          Creates a log entry with the specified error code if the LogManager is configured to process messages of level DEBUG or higher.
 void debug(java.lang.String errCode, java.lang.Exception e)
          Creates a log entry with the specified error code and the stackTrace of the specified Exception if the LogManager is configured to process messages of level DEBUG or higher.
 void debug(java.lang.String errCode, java.lang.Exception e, java.lang.String info)
          Creates a log entry with the specified error code, info string and the stackTrace of the specified Exception, if the LogManager is configured to process messages of level DEBUG or higher.
 void debug(java.lang.String errCode, java.lang.String info)
          Creates a log entry with the specified error code and info string if the LogManager is configured to process messages of level DEBUG or higher.
 boolean debugEnabled()
          Returns true if the LogManager is configured to process log entries of level DEBUG or higher.
 void error(java.lang.String errCode)
          Creates a log entry with the specified error code if the LogManager is configured to process messages of level ERROR.
 void error(java.lang.String errCode, java.lang.Exception e)
          Creates a log entry with the specified error code and the stackTrace of the specified Exception, if the LogManager is configured to process messages of level ERROR.
 void error(java.lang.String errCode, java.lang.Exception e, java.lang.String info)
          Creates a log entry with the specified error code, info string and the stackTrace of the specified Exception, if the LogManager is configured to process messages of level ERROR.
 void error(java.lang.String errCode, java.lang.String info)
          Creates a log entry with the specified error code and info string if the LogManager is configured to process messages of level ERROR.
 boolean errorEnabled()
          Returns true if the LogManager is configured to process log entries of level ERROR or higher.
 void info(java.lang.String errCode)
          Creates a log entry with the specified error code if the LogManager is configured to process messages of level INFO or higher.
 void info(java.lang.String errCode, java.lang.Exception e)
          Creates a log entry with the specified error code and the stackTrace of the specified Exception, if the LogManager is configured to process messages of level INFO or higher.
 void info(java.lang.String errCode, java.lang.Exception e, java.lang.String info)
          Creates a log entry with the specified error code, info string and the stackTrace of the specified Exception, if the LogManager is configured to process messages of level INFO or higher.
 void info(java.lang.String errCode, java.lang.String info)
          Creates a log entry with the specified error code and info string if the LogManager is configured to process messages of level INFO or higher.
 boolean infoEnabled()
          Returns true if the LogManager is configured to process log entries of level INFO or higher.
 void warn(java.lang.String errCode)
          Creates a log entry with the specified error code if the LogManager is configured to process messages of level WARN or higher.
 void warn(java.lang.String errCode, java.lang.Exception e)
          Creates a log entry with the specified error code and the stackTrace of the specified Exception, if the LogManager is configured to process messages of level WARN or higher.
 void warn(java.lang.String errCode, java.lang.Exception e, java.lang.String info)
          Creates a log entry with the specified error code, info string and the stackTrace of the specified Exception, if the LogManager is configured to process messages of level WARN or higher.
 void warn(java.lang.String errCode, java.lang.String info)
          Creates a log entry with the specified error code and info string if the LogManager is configured to process messages of level WARN or higher.
 boolean warnEnabled()
          Returns true if the LogManager is configured to process log entries of level WARN or higher.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

debugEnabled

public boolean debugEnabled()
Returns true if the LogManager is configured to process log entries of level DEBUG or higher.

infoEnabled

public boolean infoEnabled()
Returns true if the LogManager is configured to process log entries of level INFO or higher.

warnEnabled

public boolean warnEnabled()
Returns true if the LogManager is configured to process log entries of level WARN or higher.

errorEnabled

public boolean errorEnabled()
Returns true if the LogManager is configured to process log entries of level ERROR or higher.

debug

public void debug(java.lang.String errCode)
Creates a log entry with the specified error code if the LogManager is configured to process messages of level DEBUG or higher. The error code will be automatically prefixed with "ext-" to avoid confusion with built-in error codes.

debug

public void debug(java.lang.String errCode,
                  java.lang.Exception e)
Creates a log entry with the specified error code and the stackTrace of the specified Exception if the LogManager is configured to process messages of level DEBUG or higher. The error code will be automatically prefixed with "ext-" to avoid confusion with built-in error codes.

debug

public void debug(java.lang.String errCode,
                  java.lang.String info)
Creates a log entry with the specified error code and info string if the LogManager is configured to process messages of level DEBUG or higher. The error code will be automatically prefixed with "ext-" to avoid confusion with built-in error codes.

debug

public void debug(java.lang.String errCode,
                  java.lang.Exception e,
                  java.lang.String info)
Creates a log entry with the specified error code, info string and the stackTrace of the specified Exception, if the LogManager is configured to process messages of level DEBUG or higher. The error code will be automatically prefixed with "ext-" to avoid confusion with built-in error codes.

info

public void info(java.lang.String errCode)
Creates a log entry with the specified error code if the LogManager is configured to process messages of level INFO or higher. The error code will be automatically prefixed with "ext-" to avoid confusion with built-in error codes.

info

public void info(java.lang.String errCode,
                 java.lang.Exception e)
Creates a log entry with the specified error code and the stackTrace of the specified Exception, if the LogManager is configured to process messages of level INFO or higher. The error code will be automatically prefixed with "ext-" to avoid confusion with built-in error codes.

info

public void info(java.lang.String errCode,
                 java.lang.String info)
Creates a log entry with the specified error code and info string if the LogManager is configured to process messages of level INFO or higher. The error code will be automatically prefixed with "ext-" to avoid confusion with built-in error codes.

info

public void info(java.lang.String errCode,
                 java.lang.Exception e,
                 java.lang.String info)
Creates a log entry with the specified error code, info string and the stackTrace of the specified Exception, if the LogManager is configured to process messages of level INFO or higher. The error code will be automatically prefixed with "ext-" to avoid confusion with built-in error codes.

warn

public void warn(java.lang.String errCode)
Creates a log entry with the specified error code if the LogManager is configured to process messages of level WARN or higher. The error code will be automatically prefixed with "ext-" to avoid confusion with built-in error codes.

warn

public void warn(java.lang.String errCode,
                 java.lang.Exception e)
Creates a log entry with the specified error code and the stackTrace of the specified Exception, if the LogManager is configured to process messages of level WARN or higher. The error code will be automatically prefixed with "ext-" to avoid confusion with built-in error codes.

warn

public void warn(java.lang.String errCode,
                 java.lang.String info)
Creates a log entry with the specified error code and info string if the LogManager is configured to process messages of level WARN or higher. The error code will be automatically prefixed with "ext-" to avoid confusion with built-in error codes.

warn

public void warn(java.lang.String errCode,
                 java.lang.Exception e,
                 java.lang.String info)
Creates a log entry with the specified error code, info string and the stackTrace of the specified Exception, if the LogManager is configured to process messages of level WARN or higher. The error code will be automatically prefixed with "ext-" to avoid confusion with built-in error codes.

error

public void error(java.lang.String errCode)
Creates a log entry with the specified error code if the LogManager is configured to process messages of level ERROR. The error code will be automatically prefixed with "ext-" to avoid confusion with built-in error codes.

error

public void error(java.lang.String errCode,
                  java.lang.Exception e)
Creates a log entry with the specified error code and the stackTrace of the specified Exception, if the LogManager is configured to process messages of level ERROR. The error code will be automatically prefixed with "ext-" to avoid confusion with built-in error codes.

error

public void error(java.lang.String errCode,
                  java.lang.String info)
Creates a log entry with the specified error code and info string if the LogManager is configured to process messages of level ERROR. The error code will be automatically prefixed with "ext-" to avoid confusion with built-in error codes.

error

public void error(java.lang.String errCode,
                  java.lang.Exception e,
                  java.lang.String info)
Creates a log entry with the specified error code, info string and the stackTrace of the specified Exception, if the LogManager is configured to process messages of level ERROR. The error code will be automatically prefixed with "ext-" to avoid confusion with built-in error codes.