Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

cern::gp::logging::NetBeansLog Class Reference

List of all members.

Public Member Functions

 NetBeansLog (String name)
void setLevel (int currentLogLevel)
int getLevel ()
boolean isTraceEnabled ()
boolean isDebugEnabled ()
boolean isInfoEnabled ()
boolean isWarnEnabled ()
boolean isErrorEnabled ()
boolean isFatalEnabled ()
void trace (Object message)
void trace (Object message, Throwable t)
void debug (Object message)
void debug (Object message, Throwable t)
void info (Object message)
void info (Object message, Throwable t)
void warn (Object message)
void warn (Object message, Throwable t)
void error (Object message)
void error (Object message, Throwable t)
void fatal (Object message)
void fatal (Object message, Throwable t)

Static Public Attributes

final String SYSTEM_PREFIX = "cern.gp.logging"
final String LOG_LEVEL_PROPERTY = SYSTEM_PREFIX + ".DefaultLevel"
final String SHOW_LOG_NAME_PROPERTY = SYSTEM_PREFIX + ".ShowLogName"
final String SHOW_SHORT_LOG_NAME_PROPERTY = SYSTEM_PREFIX + ".ShowShortLogName"
final String SHOW_DATE_TIME_PROPERTY = SYSTEM_PREFIX + ".ShowDateTime"
final String DATE_FORMAT_PROPERTY = SYSTEM_PREFIX + ".DateFormat"
final String DATE_FORMAT_DEFAULT = "yyyy/MM/dd HH:mm:ss:SSS zzz"
final String LOG_LEVEL_DEFAULT = "info"
final boolean SHOW_LOG_NAME_DEFAULT = false
final boolean SHOW_SHORT_LOG_NAME_DEFAULT = true
final boolean SHOW_DATE_TIME_DEFAULT = false
final int LOG_LEVEL_TRACE = ErrorManager.INFORMATIONAL
final int LOG_LEVEL_DEBUG = ErrorManager.INFORMATIONAL + 1
final int LOG_LEVEL_INFO = ErrorManager.USER
final int LOG_LEVEL_WARN = ErrorManager.WARNING
final int LOG_LEVEL_ERROR = ErrorManager.EXCEPTION
final int LOG_LEVEL_FATAL = ErrorManager.ERROR
final int LOG_LEVEL_ALL = (LOG_LEVEL_TRACE - 1)
final int LOG_LEVEL_OFF = (LOG_LEVEL_FATAL + 1)

Protected Member Functions

void display (int logLevel, Object message, Throwable t)
void log (int type, Object msg, Throwable t)
String createLogMessage (int type, Object message)
boolean isLevelEnabled (int logLevel)

Protected Attributes

String logName = null
int currentLogLevel

Static Protected Attributes

final ErrorManager errMgr = ErrorManager.getDefault()
final Properties nblogProps = new Properties()
boolean showLogName = SHOW_LOG_NAME_DEFAULT
boolean showShortName = SHOW_SHORT_LOG_NAME_DEFAULT
boolean showDateTime = SHOW_DATE_TIME_DEFAULT
DateFormat dateFormatter = null

Static Package Functions

 [static initializer]

Private Attributes

String prefix = null

Detailed Description

NetBeans implementation of Log that uses the default ErrorManager. The following system properties are supported to configure the behavior of this logger:

In addition to looking for system properties with the names specified above, this implementation also checks for a class loader resource named LOG_PROPERTIES, and includes any matching definitions from this resource (if it exists).

Author:
Katarina Sigerud
Version:
Id
NetBeansLog.java,v 1.3 2006/09/25 08:52:36 acaproni Exp


Constructor & Destructor Documentation

cern::gp::logging::NetBeansLog::NetBeansLog String  name  )  [inline]
 

Construct a simple log with given name.

Parameters:
name log name


Member Function Documentation

cern::gp::logging::NetBeansLog::[static initializer]  )  [inline, static, package]
 

String cern::gp::logging::NetBeansLog::createLogMessage int  type,
Object  message
[inline, protected]
 

void cern::gp::logging::NetBeansLog::debug Object  message,
Throwable  t
[inline]
 

void cern::gp::logging::NetBeansLog::debug Object  message  )  [inline]
 

void cern::gp::logging::NetBeansLog::display int  logLevel,
Object  message,
Throwable  t
[inline, protected]
 

void cern::gp::logging::NetBeansLog::error Object  message,
Throwable  t
[inline]
 

void cern::gp::logging::NetBeansLog::error Object  message  )  [inline]
 

void cern::gp::logging::NetBeansLog::fatal Object  message,
Throwable  t
[inline]
 

void cern::gp::logging::NetBeansLog::fatal Object  message  )  [inline]
 

int cern::gp::logging::NetBeansLog::getLevel  )  [inline]
 

Get logging level.

void cern::gp::logging::NetBeansLog::info Object  message,
Throwable  t
[inline]
 

void cern::gp::logging::NetBeansLog::info Object  message  )  [inline]
 

boolean cern::gp::logging::NetBeansLog::isDebugEnabled  )  [inline]
 

boolean cern::gp::logging::NetBeansLog::isErrorEnabled  )  [inline]
 

boolean cern::gp::logging::NetBeansLog::isFatalEnabled  )  [inline]
 

boolean cern::gp::logging::NetBeansLog::isInfoEnabled  )  [inline]
 

boolean cern::gp::logging::NetBeansLog::isLevelEnabled int  logLevel  )  [inline, protected]
 

Is the given log level currently enabled?

Parameters:
logLevel is this level enabled?

boolean cern::gp::logging::NetBeansLog::isTraceEnabled  )  [inline]
 

boolean cern::gp::logging::NetBeansLog::isWarnEnabled  )  [inline]
 

void cern::gp::logging::NetBeansLog::log int  type,
Object  msg,
Throwable  t
[inline, protected]
 

Do the actual logging. This method assembles the message and then logs using the default ErrorManager.

void cern::gp::logging::NetBeansLog::setLevel int  currentLogLevel  )  [inline]
 

Set logging level.

Parameters:
level new logging level

void cern::gp::logging::NetBeansLog::trace Object  message,
Throwable  t
[inline]
 

void cern::gp::logging::NetBeansLog::trace Object  message  )  [inline]
 

void cern::gp::logging::NetBeansLog::warn Object  message,
Throwable  t
[inline]
 

void cern::gp::logging::NetBeansLog::warn Object  message  )  [inline]
 


Member Data Documentation

int cern::gp::logging::NetBeansLog::currentLogLevel [protected]
 

The current log level

final String cern::gp::logging::NetBeansLog::DATE_FORMAT_DEFAULT = "yyyy/MM/dd HH:mm:ss:SSS zzz" [static]
 

final String cern::gp::logging::NetBeansLog::DATE_FORMAT_PROPERTY = SYSTEM_PREFIX + ".DateFormat" [static]
 

DateFormat cern::gp::logging::NetBeansLog::dateFormatter = null [static, protected]
 

final ErrorManager cern::gp::logging::NetBeansLog::errMgr = ErrorManager.getDefault() [static, protected]
 

final int cern::gp::logging::NetBeansLog::LOG_LEVEL_ALL = (LOG_LEVEL_TRACE - 1) [static]
 

Enable all logging levels

final int cern::gp::logging::NetBeansLog::LOG_LEVEL_DEBUG = ErrorManager.INFORMATIONAL + 1 [static]
 

"Finer" level logging (ErrorManager.INFORMATIONAL + 1)

final String cern::gp::logging::NetBeansLog::LOG_LEVEL_DEFAULT = "info" [static]
 

final int cern::gp::logging::NetBeansLog::LOG_LEVEL_ERROR = ErrorManager.EXCEPTION [static]
 

"Warning" level logging = ErrorManager.EXCEPTION

final int cern::gp::logging::NetBeansLog::LOG_LEVEL_FATAL = ErrorManager.ERROR [static]
 

"Severe" level logging = ErrorManager.ERROR

final int cern::gp::logging::NetBeansLog::LOG_LEVEL_INFO = ErrorManager.USER [static]
 

"Config" level logging (ErrorManager.WARNING).

final int cern::gp::logging::NetBeansLog::LOG_LEVEL_OFF = (LOG_LEVEL_FATAL + 1) [static]
 

Disable all logging levels

final String cern::gp::logging::NetBeansLog::LOG_LEVEL_PROPERTY = SYSTEM_PREFIX + ".DefaultLevel" [static]
 

final int cern::gp::logging::NetBeansLog::LOG_LEVEL_TRACE = ErrorManager.INFORMATIONAL [static]
 

"Finest" level logging (Debug window).

final int cern::gp::logging::NetBeansLog::LOG_LEVEL_WARN = ErrorManager.WARNING [static]
 

"Info" level logging (ErrorManager.USER)

String cern::gp::logging::NetBeansLog::logName = null [protected]
 

The name of this simple log instance

final Properties cern::gp::logging::NetBeansLog::nblogProps = new Properties() [static, protected]
 

String cern::gp::logging::NetBeansLog::prefix = null [private]
 

final boolean cern::gp::logging::NetBeansLog::SHOW_DATE_TIME_DEFAULT = false [static]
 

final String cern::gp::logging::NetBeansLog::SHOW_DATE_TIME_PROPERTY = SYSTEM_PREFIX + ".ShowDateTime" [static]
 

final boolean cern::gp::logging::NetBeansLog::SHOW_LOG_NAME_DEFAULT = false [static]
 

final String cern::gp::logging::NetBeansLog::SHOW_LOG_NAME_PROPERTY = SYSTEM_PREFIX + ".ShowLogName" [static]
 

final boolean cern::gp::logging::NetBeansLog::SHOW_SHORT_LOG_NAME_DEFAULT = true [static]
 

final String cern::gp::logging::NetBeansLog::SHOW_SHORT_LOG_NAME_PROPERTY = SYSTEM_PREFIX + ".ShowShortLogName" [static]
 

boolean cern::gp::logging::NetBeansLog::showDateTime = SHOW_DATE_TIME_DEFAULT [static, protected]
 

boolean cern::gp::logging::NetBeansLog::showLogName = SHOW_LOG_NAME_DEFAULT [static, protected]
 

boolean cern::gp::logging::NetBeansLog::showShortName = SHOW_SHORT_LOG_NAME_DEFAULT [static, protected]
 

final String cern::gp::logging::NetBeansLog::SYSTEM_PREFIX = "cern.gp.logging" [static]
 


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 03:08:31 2009 for ACS Java API by doxygen 1.3.8