Module pico8lib.log

Write timestamped and leveled logs to STDOUT

Fields

P8LIBLOGLVL P8LIBLOGLVL configures the logging functions to only output certain log levels.
P8LIBLOGUTC P8LIBLOGUTC configures the output to either use UTC or local time.

Local Functions

log (any, prefix) Log the passed in object to STDOUT The passed in object will be converted to a string and then logged with a timestamp.
log_debug (any) Log the passed in object to STDOUT with the DBG tag See the log function for details
log_info (any) Log the passed in object to STDOUT with the INF tag See the log function for details
log_warn (any) Log the passed in object to STDOUT with the WRN tag See the log function for details
log_err (any) Log the passed in object to STDOUT with the ERR tag See the log function for details


Fields

P8LIBLOGLVL
P8LIBLOGLVL configures the logging functions to only output certain log levels. - 0 - disable logging - 1 - errors only - 2 - errors and warnings - 3 - errors, warnings, info - 4 - errors, warnings, info, debug (aka everything)
P8LIBLOGUTC
P8LIBLOGUTC configures the output to either use UTC or local time. false (default) for local time, true for UTC

Local Functions

log (any, prefix)
Log the passed in object to STDOUT The passed in object will be converted to a string and then logged with a timestamp.

Parameters:

  • any The object to log
  • prefix string A prefix to prepend to the message
log_debug (any)
Log the passed in object to STDOUT with the DBG tag See the log function for details

Parameters:

  • any The object to log
log_info (any)
Log the passed in object to STDOUT with the INF tag See the log function for details

Parameters:

  • any The object to log
log_warn (any)
Log the passed in object to STDOUT with the WRN tag See the log function for details

Parameters:

  • any The object to log
log_err (any)
Log the passed in object to STDOUT with the ERR tag See the log function for details

Parameters:

  • any The object to log
generated by LDoc 1.5.0 Last updated 2024-09-08 14:28:56