NullLogger
NullLogger is a logger that log nothing. This may be useful in unit tests
Implements
Extends
Overwritten Methods
log
logger.log(level: enum(LogLevels), msg: string, context :object = null): void
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| level | enum(LogLevels) | Yes | - | The level message |
| msg | string | Yes | - | The message to log |
| context | ?object | No | null | A context object which should be stringify-able |
Returns:
Type: void
Inherited Methods
error
logger.error(msg: string, context :object = null): void
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| msg | string | Yes | - | The message to log |
| context | ?object | No | null | A context object which should be stringify-able |
Returns:
Type: void
Internally calls
this.log(LogLevels.ERROR, msg, context)which is abstract
warn
logger.warn(msg: string, context :object = null): void
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| msg | string | Yes | - | The message to log |
| context | ?object | No | null | A context object which should be stringify-able |
Returns:
Type: void
Internally calls
this.log(LogLevels.WARN, msg, context)which is abstract
info
logger.info(msg: string, context :object = null): void
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| msg | string | Yes | - | The message to log |
| context | ?object | No | null | A context object which should be stringify-able |
Returns:
Type: void
Internally calls
this.log(LogLevels.INFO, msg, context)which is abstract
verbose
logger.verbose(msg: string, context :object = null): void
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| msg | string | Yes | - | The message to log |
| context | ?object | No | null | A context object which should be stringify-able |
Returns:
Type: void
Internally calls
this.log(LogLevels.VERBOSE, msg, context)which is abstract
debug
logger.debug(msg: string, context :object = null): void
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| msg | string | Yes | - | The message to log |
| context | ?object | No | null | A context object which should be stringify-able |
Returns:
Type: void
Internally calls
this.log(LogLevels.DEBUG, msg, context)which is abstract
silly
logger.silly(msg: string, context :object = null): void
Parameters:
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| msg | string | Yes | - | The message to log |
| context | ?object | No | null | A context object which should be stringify-able |
Returns:
Type: void
Internally calls
this.log(LogLevels.SILLY, msg, context)which is abstract
