Inherits org::apache::commons::logging::Log.
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] |
NetBeans implementation of Log that uses the default ErrorManager. The following system properties are supported to configure the behavior of this logger:
LOG_LEVEL_PROPERTY
- Default logging detail level for all instances of NetBeansLog. Must be one of ("trace", "debug", "info", "warn", "error", or "fatal"). If not specified, defaults to LOG_LEVEL_DEFAULT. SHOW_LOG_NAME_PROPERTY
- Set to true
if you want the Log instance name to be included in output messages. Defaults to SHOW_LOG_NAME_DEFAULT SHOW_SHORT_LOG_NAME_PROPERTY
- Set to true
if you want the last component of the name to be included in output messages. Defaults to SHOW_SHORT_LOG_NAME_DEFAULT. SHOW_DATE_TIME_PROPERTY
- Set to true
if you want the current date and time to be included in output messages. Default is SHOW_DATE_TIME_DEFAULT. SYSTEM_PREFIX.log.xxxxx
- Logging detail level for a NetBeansLog instance named "xxxxx". Must be one of ("trace", "debug", "info", "warn", "error", or "fatal"). If not specified, the default logging detail level is used. 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).
cern.gp.logging.NetBeansLog.NetBeansLog | ( | String | name | ) |
Construct a simple log with given name.
name | log name |
References cern.gp.logging.NetBeansLog.LOG_LEVEL_PROPERTY, cern.gp.logging.NetBeansLog.logName, cern.gp.logging.NetBeansLog.nblogProps, cern.gp.logging.NetBeansLog.setLevel(), and cern.gp.logging.NetBeansLog.SYSTEM_PREFIX.
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 | ( | ) |
References cern.gp.logging.NetBeansLog.isLevelEnabled().
boolean cern.gp.logging.NetBeansLog.isErrorEnabled | ( | ) |
References cern.gp.logging.NetBeansLog.isLevelEnabled().
boolean cern.gp.logging.NetBeansLog.isFatalEnabled | ( | ) |
References cern.gp.logging.NetBeansLog.isLevelEnabled().
boolean cern.gp.logging.NetBeansLog.isInfoEnabled | ( | ) |
References cern.gp.logging.NetBeansLog.isLevelEnabled().
boolean cern.gp.logging.NetBeansLog.isLevelEnabled | ( | int | logLevel | ) | [protected] |
Is the given log level currently enabled?
logLevel | is this level enabled? |
References cern.gp.logging.NetBeansLog.currentLogLevel.
Referenced by cern.gp.logging.NetBeansLog.debug(), cern.gp.logging.NetBeansLog.error(), cern.gp.logging.NetBeansLog.fatal(), cern.gp.logging.NetBeansLog.info(), cern.gp.logging.NetBeansLog.isDebugEnabled(), cern.gp.logging.NetBeansLog.isErrorEnabled(), cern.gp.logging.NetBeansLog.isFatalEnabled(), cern.gp.logging.NetBeansLog.isInfoEnabled(), cern.gp.logging.NetBeansLog.isTraceEnabled(), cern.gp.logging.NetBeansLog.isWarnEnabled(), cern.gp.logging.NetBeansLog.trace(), and cern.gp.logging.NetBeansLog.warn().
boolean cern.gp.logging.NetBeansLog.isTraceEnabled | ( | ) |
References cern.gp.logging.NetBeansLog.isLevelEnabled().
boolean cern.gp.logging.NetBeansLog.isWarnEnabled | ( | ) |
References cern.gp.logging.NetBeansLog.isLevelEnabled().
void cern.gp.logging.NetBeansLog.log | ( | int | type, | |
Object | msg, | |||
Throwable | t | |||
) | [protected] |
Do the actual logging. This method assembles the message and then logs using the default ErrorManager
.
References cern.gp.logging.NetBeansLog.createLogMessage(), and cern.gp.logging.NetBeansLog.errMgr.
Referenced by cern.gp.logging.NetBeansLog.debug(), cern.gp.logging.NetBeansLog.error(), cern.gp.logging.NetBeansLog.fatal(), cern.gp.logging.NetBeansLog.info(), cern.gp.logging.NetBeansLog.trace(), and cern.gp.logging.NetBeansLog.warn().
void cern.gp.logging.NetBeansLog.setLevel | ( | int | currentLogLevel | ) |
Set logging level.
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 | ) |
int cern.gp.logging.NetBeansLog.currentLogLevel [protected] |
The current log level
Referenced by cern.gp.logging.NetBeansLog.getLevel(), and cern.gp.logging.NetBeansLog.isLevelEnabled().
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] |
Referenced by cern.gp.logging.NetBeansLog.createLogMessage().
final ErrorManager cern.gp.logging.NetBeansLog.errMgr = ErrorManager.getDefault() [static, protected] |
Referenced by cern.gp.logging.NetBeansLog.log().
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
)
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().
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 = ".DefaultLevel" [static] |
Referenced by cern.gp.logging.NetBeansLog.NetBeansLog().
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] |
Referenced by cern.gp.logging.NetBeansLog.NetBeansLog().
final boolean cern.gp.logging.NetBeansLog.SHOW_DATE_TIME_DEFAULT = false [static] |
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 boolean cern.gp.logging.NetBeansLog.SHOW_SHORT_LOG_NAME_DEFAULT = true [static] |
final String cern.gp.logging.NetBeansLog.SHOW_SHORT_LOG_NAME_PROPERTY = ".ShowShortLogName" [static] |
boolean cern.gp.logging.NetBeansLog.showDateTime = SHOW_DATE_TIME_DEFAULT [static, protected] |
Referenced by cern.gp.logging.NetBeansLog.createLogMessage().
boolean cern.gp.logging.NetBeansLog.showLogName = SHOW_LOG_NAME_DEFAULT [static, protected] |
Referenced by cern.gp.logging.NetBeansLog.createLogMessage().
boolean cern.gp.logging.NetBeansLog.showShortName = SHOW_SHORT_LOG_NAME_DEFAULT [static, protected] |
Referenced by cern.gp.logging.NetBeansLog.createLogMessage().
final String cern.gp.logging.NetBeansLog.SYSTEM_PREFIX = "cern.gp.logging" [static] |
Referenced by cern.gp.logging.NetBeansLog.NetBeansLog().