has.getLogManager(): LogManager
Obtains a log manager.
Since: 1.0.0
Return value
A LogManager object, which can be used for log operations.
Example
const logger = has.getLogManager();
LogManager.log(Object|Array|number|string ...args)
Prints log-level logs.
Since: 1.0.0
Parameters
Name | Type | Mandatory | Description |
|---|---|---|---|
...args | Object|Array|number|string | No | Log content, which can contain multiple records. |
Example
const logger = has.getLogManager();
logger.log({ str: 'hello world' }, 'basic log', 100, [1, 2, 3]); LogManager.info(Object|Array|number|string ...args)
Prints info-level logs.
Since: 1.0.0
Parameters
Name | Type | Mandatory | Description |
|---|---|---|---|
...args | Object|Array|number|string | No | Log content, which can contain multiple records. |
Example
const logger = has.getLogManager();
logger.info({ str: 'hello world' }, 'basic log', 100, [1, 2, 3]); LogManager.debug(Object|Array|number|string ...args)
Prints debug-level logs.
Since: 1.0.0
Parameters
Name | Type | Mandatory | Description |
|---|---|---|---|
...args | Object|Array|number|string | No | Log content, which can contain multiple records. |
Example
const logger = has.getLogManager();
logger.debug({ str: 'hello world' }, 'basic log', 100, [1, 2, 3]); LogManager.warn(Object|Array|number|string ...args)
Prints warn-level logs.
Since: 1.0.0
Parameters
Name | Type | Mandatory | Description |
|---|---|---|---|
...args | Object|Array|number|string | No | Log content, which can contain multiple records. |
Example
const logger = has.getLogManager();
logger.warn({ str: 'hello world' }, 'basic log', 100, [1, 2, 3]); LogManager.error(Object|Array|number|string ...args)
Prints error-level logs.
Since: 1.0.0
Parameters
Name | Type | Mandatory | Description |
|---|---|---|---|
...args | Object|Array|number|string | No | Log content, which can contain multiple records. |
Example
const logger = has.getLogManager();
logger.error({ str: 'hello world' }, 'basic log', 100, [1, 2, 3]); console.debug(any ...args)
Prints debug-level logs on the console.
Since: 1.0.0
Parameters
Name | Type | Mandatory | Description |
|---|---|---|---|
...args | any | No | Log content, which can contain multiple records. |
Example
console.debug('debug level message .'); console.error(any ...args)
Prints error-level logs on the console.
Since: 1.0.0
Parameters
Name | Type | Mandatory | Description |
|---|---|---|---|
...args | any | No | Log content, which can contain multiple records. |
Example
console.error('error level message .'); console.info(any ...args)
Prints info-level logs on the console.
Since: 1.0.0
Parameters
Name | Type | Mandatory | Description |
|---|---|---|---|
...args | any | No | Log content, which can contain multiple records. |
Example
console.info('info level message .');