Internal
Instantiates a new Logger
.
Logger
instances should NOT be instantiated directly using this constructor as the instance
will not be registered and cached within the LogService. (This will mean that every instance
of the parent class will end up with its own duplicate copy, rather than sharing a single instance.)
Instead, use the LogService.getLogger() method, i.e.
this._log = logService.getLogger('MyComponent');
Readonly
nameA name, usually that of the 'parent' component, that will be logged with each message.
Logs the message if condition
is false
.
The log entry is recorded as Level.error.
A boolean value or statement that determines if the message is logged or not.
The text message to be logged.
Logs the message if condition
is false
.
The log entry is recorded as Level.error.
A boolean value or statement that determines if the message is logged or not.
An Error object to be logged.
Logs the message if condition
is false
.
The log entry is recorded as Level.error.
A boolean value or statement that determines if the message is logged or not.
The text message to be logged.
An Error object to be logged.
Logs the message if condition
is false
.
The log entry is recorded as Level.error.
A boolean value or statement that determines if the message is logged or not.
An object
to be logged.
Logs the message as Level.debug.
The text message to be logged.
Logs the message as Level.debug.
An Error object to be logged.
Logs the message as Level.debug.
The text message to be logged.
An Error object to be logged.
Logs the message as Level.debug.
The text message to be logged.
An object
to be logged.
Logs the message as Level.error.
The text message to be logged.
Logs the message as Level.error.
An Error object to be logged.
Logs the message as Level.error.
The text message to be logged.
An Error object to be logged.
Logs the message as Level.error.
The text message to be logged.
An object
to be logged.
Logs the message as Level.fatal.
The text message to be logged.
Logs the message as Level.fatal.
An Error object to be logged.
Logs the message as Level.fatal.
The text message to be logged.
An Error object to be logged.
Logs the message as Level.fatal.
The text message to be logged.
An object
to be logged.
Logs the message as Level.info.
The text message to be logged.
Logs the message as Level.info.
An Error object to be logged.
Logs the message as Level.info.
The text message to be logged.
An Error object to be logged.
Logs the message as Level.info.
The text message to be logged.
An object
to be logged.
Logs the message as the specified level.
The name of the level.
The text message to be logged.
If no Level has been defined for the specified levelName
, the message will be ignored.
Logs the message as the specified level.
The name of the level.
Logs the message as the specified level.
The name of the level.
The text message to be logged.
Logs the message as the specified level.
The name of the level.
The text message to be logged.
An object
to be logged.
If no Level has been defined for the specified levelName
, the message will be ignored.
Logs the message as Level.warn.
The text message to be logged.
Logs the message as Level.warn.
An Error object to be logged.
Logs the message as Level.warn.
The text message to be logged.
An Error object to be logged.
Logs the message as Level.warn.
The text message to be logged.
An object
to be logged.
The
Logger
class provides access to the methods for logging messages at the required Level.Typically, each component or service will instantiate its own
Logger
instance, which will include the logger's Logger.name in the logged message.