Description Usage Arguments Examples
This function executes immediately before the function definitions for the base handler functions (message, warning, and stop, and logs their timestamped output (a bit more verbosely) to a log file. The log file is an ndjson file, which is a portable, JSON-based format that is easily parsed by many line-processing systems.
1 |
log_lvl |
Level of log output. In actual practice, one of "DEBUG",
"INFO", "WARN", and "ERROR" are common, but any string may be supplied if
|
log_msg |
Main log message. Will be coerced to class |
... |
A named |
echo |
Should the log file entry be printed to the console as well?
Defaults to |
custom_log_lvl |
Allow log levels other than "DEBUG", "INFO", "WARN",
and "ERROR"? Defaults to |
sanitizer |
Sanitizer function to run over elements in log data. The
default sanitizer, if not specified, is |
1 2 | loggit("INFO", "This is a message", but_maybe = "you want more fields?",
sure = "why not?", like = 2, or = 10, what = "ever")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.