orca.util
Class LoggingTool

java.lang.Object
  extended by orca.util.LoggingTool

public class LoggingTool
extends java.lang.Object


Field Summary
static java.lang.String configFileLocation
          Location of the log configuration file.
static int LogAlert
          Action must be taken immediately.
static int LogCritical
          Critical condition.
static int LogDebug
          Debug level messages.
static int LogError
          Error condition.
static int LogFatal
          The system is unusable.
static int LogInfo
          Informational.
static int LogNotice
          Normal but significant condition.
static int LogTime
          Time/Performance measurement related condition.
static int LogWarning
          Warning condition.
static int MaxLogLevel
          Maximum log level.
static int MinLogLevel
          Minimum log level.
static java.lang.String PathPrefix
           
 
Constructor Summary
LoggingTool()
          Create a new logger
LoggingTool(java.lang.String classname)
          Create a new logger with the given name
 
Method Summary
 void alert(java.lang.Object o)
           
 void critical(java.lang.Object o)
           
 void debug(java.lang.Object o)
           
 void dumpClasspath()
          Prints the current class path
 void dumpSystemProperties()
          Prints some important system properties
 void error(java.lang.Object o)
           
 void exception(java.lang.Exception e)
           
 void exception(java.lang.String err, java.lang.Exception e)
           
 void fatal(java.lang.Object o)
           
 void info(java.lang.Object o)
           
static boolean log(int logLevel)
          Determines if the given log message should be logged.
static boolean logAlert()
           
static boolean logCritical()
           
static boolean logDebug()
           
static boolean logError()
           
static boolean logFatal()
           
static boolean logInfo()
           
static boolean logNotice()
           
static boolean logTime()
           
static boolean logWarning()
           
 void notice(java.lang.Object o)
           
 void time(java.lang.Object o)
           
 void warn(java.lang.Object o)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configFileLocation

public static final java.lang.String configFileLocation
Location of the log configuration file. It is relative to the container root. The container root can be obtained from ContainerManager.getPathPrefix(). When running inside a web services container, there is a potential race: ContainerManager may not be initialized by the time the call to getPathPrefix() is made. In the current implementation, ContainerManager is initialized as soon as the configuration for the container is uploaded. No loggers should be created before the ContainerManager has been set up.

See Also:
Constant Field Values

LogFatal

public static final int LogFatal
The system is unusable. Log4J translation: FATAL

See Also:
Constant Field Values

LogAlert

public static final int LogAlert
Action must be taken immediately. Log4J translation: ERROR

See Also:
Constant Field Values

LogCritical

public static final int LogCritical
Critical condition. Log4J translation: ERROR

See Also:
Constant Field Values

LogError

public static final int LogError
Error condition. Log4J translation: ERROR

See Also:
Constant Field Values

LogWarning

public static final int LogWarning
Warning condition. Log4J translation: WARN

See Also:
Constant Field Values

LogTime

public static final int LogTime
Time/Performance measurement related condition. Log4j translation: INFO

See Also:
Constant Field Values

LogNotice

public static final int LogNotice
Normal but significant condition. Log4J translation: INFO

See Also:
Constant Field Values

LogInfo

public static final int LogInfo
Informational. Log4J translation: INFO

See Also:
Constant Field Values

LogDebug

public static final int LogDebug
Debug level messages. Log4J translation: DEBUG

See Also:
Constant Field Values

PathPrefix

public static java.lang.String PathPrefix

MinLogLevel

public static int MinLogLevel
Minimum log level. Messages with smaller log level will not be printed to the log. MinLogLevel should be 0 most of the time. Change it only if you want to isolate a particular log message.


MaxLogLevel

public static int MaxLogLevel
Maximum log level. Messages with higher log level will not be printed to the log. Controls the verbosity of the log.

Constructor Detail

LoggingTool

public LoggingTool()
Create a new logger


LoggingTool

public LoggingTool(java.lang.String classname)
Create a new logger with the given name

Parameters:
classname -
Method Detail

dumpSystemProperties

public void dumpSystemProperties()
Prints some important system properties


dumpClasspath

public void dumpClasspath()
Prints the current class path


log

public static boolean log(int logLevel)
Determines if the given log message should be logged.

Parameters:
logLevel -
Returns:

logFatal

public static boolean logFatal()

logAlert

public static boolean logAlert()

logCritical

public static boolean logCritical()

logError

public static boolean logError()

logWarning

public static boolean logWarning()

logTime

public static boolean logTime()

logNotice

public static boolean logNotice()

logInfo

public static boolean logInfo()

logDebug

public static boolean logDebug()

fatal

public void fatal(java.lang.Object o)

alert

public void alert(java.lang.Object o)

critical

public void critical(java.lang.Object o)

error

public void error(java.lang.Object o)

warn

public void warn(java.lang.Object o)

notice

public void notice(java.lang.Object o)

time

public void time(java.lang.Object o)

info

public void info(java.lang.Object o)

debug

public void debug(java.lang.Object o)

exception

public void exception(java.lang.String err,
                      java.lang.Exception e)

exception

public void exception(java.lang.Exception e)


Copyright © 2007 Network/Internet Computing Lab. All Rights Reserved.