Class Logger
The Logger class provides logging utility methods.
| Property | Description |
|---|---|
debugEnabled: Boolean (read-only) | This method returns true if debug logging is enabled. |
errorEnabled: Boolean (read-only) | This method returns true if error logging is enabled. |
infoEnabled: Boolean (read-only) | This method returns true if info logging is enabled. |
rootLogger: Log (read-only) | Returns the root logger object. |
warnEnabled: Boolean (read-only) | This method returns true if warning logging is enabled. |
This class does not have a constructor, so you cannot create it directly.
| Method | Description |
|---|---|
| static debug(String, Object...) | The method reports an debug level message. |
| static error(String, Object...) | The method reports an error level message. |
| static getLogger(String) | Returns the logger object for the given category. |
| static getLogger(String, String) | Returns the logger object for the given file name prefix and category. |
| static getRootLogger() | Returns the root logger object. |
| static info(String, Object...) | The method reports an information level message. |
| static isDebugEnabled() | This method returns true if debug logging is enabled. |
| static isErrorEnabled() | This method returns true if error logging is enabled. |
| static isInfoEnabled() | This method returns true if info logging is enabled. |
| static isWarnEnabled() | This method returns true if warning logging is enabled. |
| static warn(String, Object...) | The method reports an warning level message. |
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
- debugEnabled: Boolean
(read-only) This method returns true if debug logging is enabled.
- errorEnabled: Boolean
(read-only) This method returns true if error logging is enabled.
- infoEnabled: Boolean
(read-only) This method returns true if info logging is enabled.
- rootLogger: Log
(read-only) Returns the root logger object.
- warnEnabled: Boolean
(read-only) This method returns true if warning logging is enabled.
- static debug(msg: String, args: Object...): void
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.
- static error(msg: String, args: Object...): void
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.
- static getLogger(category: String): Log
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.
- static getLogger(fileNamePrefix: String, category: String): Log
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.
- static getRootLogger(): Log
Returns the root logger object.
Returns:
- the root logger object.
- static info(msg: String, args: Object...): void
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.
- static isDebugEnabled(): Boolean
This method returns true if debug logging is enabled.
Returns:
- true if logging of debug messages is enabled, false otherwise.
- static isErrorEnabled(): Boolean
This method returns true if error logging is enabled.
Returns:
- true if logging of error messages is enabled, false otherwise.
- static isInfoEnabled(): Boolean
This method returns true if info logging is enabled.
Returns:
- true if logging of info messages is enabled, false otherwise.
- static isWarnEnabled(): Boolean
This method returns true if warning logging is enabled.
Returns:
- true if logging of warn messages is enabled, false otherwise.
- static warn(msg: String, args: Object...): void
The method reports an warning 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.