@io-arc/logger
Logging output to Terminal console.
Use Kleur to specify colors.
Kleur is also bundled, so no installation is required.
#
Usageindex.ts
#
MethodsNo New
instance.
This class is static function.
Logger.message(message[, color])
#
Return: void
General purpose log.
Parameters
params | type | default | description |
---|---|---|---|
message | string | - | Log message |
color (optional) | Kleur Color | Kluer.reset | Log color |
Logger.start(task[, isBr])
#
Return: void
Task stated log.
message color is blue.
Parameters
params | type | default | description |
---|---|---|---|
task | string | - | Started task name |
isBr (optional) | boolean | false | Create a new line at the top |
Logger.completed(task[, isBr])
#
Return: void
Task completed log.
message color is green.
Parameters
params | type | default | description |
---|---|---|---|
task | string | - | Completed task name |
isBr (optional) | boolean | false | Create a new line at the top |
Logger.failed(task, error[, isNotify])
#
Return: void
Task error log.
message color is red.
Parameters
params | type | default | description |
---|---|---|---|
task | string | - | Error task name |
error | Error | string | null | - | Error message |
isNotify (optional) | boolean | true | Using node-notifier |