CORE/docs/references/Logger.md

77 lines
2.5 KiB
Markdown
Raw Normal View History

---
hide:
- navigation
---
# Logger (/root/CORE/Logger)
The CORE logger implementation (with formatting support!)
## Signals
### logevent
- emitted on `log message`
- argument `type` (type `String`, can be `DIAG`, `INFO`, `WARN` or `ERR!`)
- argument `script` (type `String`)
- argument `message` (type `String`)
- argument `logmessage` (type `String`, description `The full log message as printed in console`)
## Methods
### diag()
- returns `void`
- description `Prints a diagnostic message`
- argument `script`
- type `String`
- mandatory `yes`
- description `The script where the log message is coming from`
- argument `message`
- type `String`
- mandatory `yes`
- description `Your log message`
- argument `preproc`
- type `bool`
- mandatory `no, default value is true`
- description `If the log message should be run through the preprocessor. If false formatting will be disabled for that log message.`
### info()
- returns `void`
- description `Prints a informational message`
- argument `script`
- type `String`
- mandatory `yes`
- description `The script where the log message is coming from`
- argument `message`
- type `String`
- mandatory `yes`
- description `Your log message`
- argument `preproc`
- type `bool`
- mandatory `no, default value is true`
- description `If the log message should be run through the preprocessor. If false formatting will be disabled for that log message.`
### warn()
- returns `void`
- description `Prints a warning message`
- argument `script`
- type `String`
- mandatory `yes`
- description `The script where the log message is coming from`
- argument `message`
- type `String`
- mandatory `yes`
- description `Your log message`
- argument `preproc`
- type `bool`
- mandatory `no, default value is true`
- description `If the log message should be run through the preprocessor. If false formatting will be disabled for that log message.`
### error()
- returns `void`
- description `Prints a error message`
- argument `script`
- type `String`
- mandatory `yes`
- description `The script where the log message is coming from`
- argument `message`
- type `String`
- mandatory `yes`
- description `Your log message`
- argument `preproc`
- type `bool`
- mandatory `no, default value is true`
- description `If the log message should be run through the preprocessor. If false formatting will be disabled for that log message.`