dw.system
Class Logger
dw.system.Logger
The Logger class provides logging utility methods.
Properties
rootLogger
:
Log
(Read Only)
The root logger object.
Constructor Summary
This class does not have a constructor, so you cannot create it directly.
Method Summary
static getLogger(fileNamePrefix
:
String, category
:
String)
:
Log
Returns the logger object for the given file name prefix and category.
static getRootLogger()
:
Log
Returns the root logger object.
static isDebugEnabled()
:
boolean
This method returns true if debug logging is enabled.
static isErrorEnabled()
:
boolean
This method returns true if error logging is enabled.
static isInfoEnabled()
:
boolean
This method returns true if info logging is enabled.
static isWarnEnabled()
:
boolean
This method returns true if warning logging is enabled.
Methods inherited from class
Object
assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values
Method Detail
debug
The method reports an debug level message. Arguments can be embedded
into the message, e.g. like "Failure {0} in {1}". The method implements
the Java MessageFormat.format() syntax.
Parameters:
msg
-
the message to log.
args
-
the arguments to insert into the message.
error
The method reports an error level message. Arguments can be embedded
into the message, e.g. like "Failure {0} in {1}". The method implements
the Java MessageFormat.format() syntax.
Parameters:
msg
-
the message to log.
args
-
the arguments to insert into the message.
getLogger
Returns the logger object for the given category.
Parameters:
category
-
- the category to get the logger for
Returns:
the logger object for the given category.
getLogger
Returns the logger object for the given file name prefix and category.
Throws an exception if maximum number of custom log files per day has already been obtained.
Parameters:
fileNamePrefix
-
- the file name prefix to identify the logger must not be null or an empty string, must be at least 3 characters long, can contain characters a-z A-Z 0-9 '-' '_' only, can have up to 25 characters must not start or end with '-' or '_' can only start or end with a-z A-Z 0-9
category
-
- the category to get the logger for, must not be null
Returns:
the logger object for the given category.
getRootLogger
static getRootLogger()
:
Log
Returns the root logger object.
Returns:
the root logger object.
info
The method reports an information level message. Arguments can be embedded
into the message, e.g. like "Failure {0} in {1}". The method implements
the Java MessageFormat.format() syntax.
Parameters:
msg
-
the message to log.
args
-
the arguments to insert into the message.
isDebugEnabled
static isDebugEnabled()
:
boolean
This method returns true if debug logging is enabled.
Returns:
true if logging of debug messages is enabled, false otherwise.
isErrorEnabled
static isErrorEnabled()
:
boolean
This method returns true if error logging is enabled.
Returns:
true if logging of error messages is enabled, false otherwise.
isInfoEnabled
static isInfoEnabled()
:
boolean
This method returns true if info logging is enabled.
Returns:
true if logging of info messages is enabled, false otherwise.
isWarnEnabled
static isWarnEnabled()
:
boolean
This method returns true if warning logging is enabled.
Returns:
true if logging of warn messages is enabled, false otherwise.