Console appender
Console is the simplest appender. It just writes the log messages
to io.stdout
.
function logging.console { [logPattern = string], [timestampPattern = string], }
logPattern
:
A pattern can be specified to control how the message is written.
The default value is"%date %level %message\n"
.timestampPattern
:
This is an optional parameter that can be used to specify a date pattern that will be passed to theos.date
function to create the timestamp for the log message.
Examples
require"logging.console" local logger = logging.console() logger:info("logging.console test") logger:debug("debugging...") logger:error("error!")