Logger - truemedian/Discordia GitHub Wiki

Used to log formatted messages to the stdout (the console) or to a file. The dateTime argument should be a format string that is accepted by os.date. The file argument should be a relative or absolute file path or nil if no log file is desired. See the logLevel enumeration for acceptable log level values.

Methods

log

Methods

:log( level, msg, ... )

If the provided level is less than or equal to the log level set on initialization, this logs a message to stdout as defined by Luvit's process module and to a file if one was provided on initialization. The msg, ... pair is formatted according to string.format and returned if the message is logged.

Name Type
level number
msg string
... *

Returns: string

⚠️ **GitHub.com Fallback** ⚠️