Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Static Package Functions

cern.gp.logging.NetBeansLog Class Reference

Inherits org::apache::commons::logging::Log.

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

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

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

Static Package Functions

 [static initializer]

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  ) 

Member Function Documentation

cern.gp.logging.NetBeansLog.[static initializer] (  )  [static, package]
String cern.gp.logging.NetBeansLog.createLogMessage ( int  type,
Object  message 
) [protected]
void cern.gp.logging.NetBeansLog.debug ( Object  message  ) 
void cern.gp.logging.NetBeansLog.debug ( Object  message,
Throwable  t 
)
void cern.gp.logging.NetBeansLog.display ( int  logLevel,
Object  message,
Throwable  t 
) [protected]
void cern.gp.logging.NetBeansLog.error ( Object  message,
Throwable  t 
)
void cern.gp.logging.NetBeansLog.error ( Object  message  ) 
void cern.gp.logging.NetBeansLog.fatal ( Object  message,
Throwable  t 
)
void cern.gp.logging.NetBeansLog.fatal ( Object  message  ) 
int cern.gp.logging.NetBeansLog.getLevel (  ) 

Get logging level.

References cern.gp.logging.NetBeansLog.currentLogLevel.

void cern.gp.logging.NetBeansLog.info ( Object  message  ) 
void cern.gp.logging.NetBeansLog.info ( Object  message,
Throwable  t 
)
boolean cern.gp.logging.NetBeansLog.isDebugEnabled (  ) 
boolean cern.gp.logging.NetBeansLog.isErrorEnabled (  ) 
boolean cern.gp.logging.NetBeansLog.isFatalEnabled (  ) 
boolean cern.gp.logging.NetBeansLog.isInfoEnabled (  ) 
boolean cern.gp.logging.NetBeansLog.isLevelEnabled ( int  logLevel  )  [protected]
boolean cern.gp.logging.NetBeansLog.isTraceEnabled (  ) 
boolean cern.gp.logging.NetBeansLog.isWarnEnabled (  ) 
void cern.gp.logging.NetBeansLog.log ( int  type,
Object  msg,
Throwable  t 
) [protected]
void cern.gp.logging.NetBeansLog.setLevel ( int  currentLogLevel  ) 

Set logging level.

Parameters:
level new logging level

Referenced by cern.gp.logging.NetBeansLog.NetBeansLog().

void cern.gp.logging.NetBeansLog.trace ( Object  message,
Throwable  t 
)
void cern.gp.logging.NetBeansLog.trace ( Object  message  ) 
void cern.gp.logging.NetBeansLog.warn ( Object  message,
Throwable  t 
)
void cern.gp.logging.NetBeansLog.warn ( Object  message  ) 

Member Data Documentation

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 = ".DateFormat" [static]
DateFormat cern.gp.logging.NetBeansLog.dateFormatter = null [static, protected]
final ErrorManager cern.gp.logging.NetBeansLog.errMgr = ErrorManager.getDefault() [static, protected]

Enable all logging levels

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

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

Referenced by cern.gp.logging.NetBeansLog.debug().

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

Referenced by cern.gp.logging.NetBeansLog.error().

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

"Severe" level logging = ErrorManager.ERROR

Referenced by cern.gp.logging.NetBeansLog.fatal().

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

"Config" level logging (ErrorManager.WARNING).

Referenced by cern.gp.logging.NetBeansLog.info().

Disable all logging levels

final String cern.gp.logging.NetBeansLog.LOG_LEVEL_PROPERTY = ".DefaultLevel" [static]
final int cern.gp.logging.NetBeansLog.LOG_LEVEL_TRACE = ErrorManager.INFORMATIONAL [static]

"Finest" level logging (Debug window).

Referenced by cern.gp.logging.NetBeansLog.trace().

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

"Info" level logging (ErrorManager.USER)

Referenced by cern.gp.logging.NetBeansLog.warn().

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

The name of this simple log instance

Referenced by cern.gp.logging.NetBeansLog.createLogMessage(), and cern.gp.logging.NetBeansLog.NetBeansLog().

final Properties cern.gp.logging.NetBeansLog.nblogProps = new Properties() [static, protected]
final String cern.gp.logging.NetBeansLog.SHOW_DATE_TIME_PROPERTY = ".ShowDateTime" [static]
final boolean cern.gp.logging.NetBeansLog.SHOW_LOG_NAME_DEFAULT = false [static]
final String cern.gp.logging.NetBeansLog.SHOW_LOG_NAME_PROPERTY = ".ShowLogName" [static]
final String cern.gp.logging.NetBeansLog.SHOW_SHORT_LOG_NAME_PROPERTY = ".ShowShortLogName" [static]
final String cern.gp.logging.NetBeansLog.SYSTEM_PREFIX = "cern.gp.logging" [static]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties