logger#
local logger = require 'logger'
Logging utilities. Modules should use this for any output instead of print
or directly writing to the console, etc.
Classes#
- class logger.logger#
- Example#
local log = logger.logger:new("my-module") log:debug("A debug message.") log:warn("A warning with a %s", variable)
- new(name)#
Create a new
logger
. The provided name should be informative and match the name of the module in most cases.The underlying logging options, such as log file name and log level are controlled by the overlay.
- Parameters:
name (
string
) – The name for the logger. This will be displayed next to any messages this logger creates.- Return type:
Version History
Version
Notes
0.0.1
Added
- error(...)#
Log an
ERROR
message. The function parameters work exactly the same asstring.format
.Version History
Version
Notes
0.0.1
Added
- warn(...)#
Log a
WARNING
message. The function parameters work exactly the same asstring.format
.Version History
Version
Notes
0.0.1
Added
- info(...)#
Log a
INFO
message. The function parameters work exactly the same asstring.format
.Version History
Version
Notes
0.0.1
Added
- debug(...)#
Log a
DEBUG
message. The function parameters work exactly the same asstring.format
.Version History
Version
Notes
0.0.1
Added
Version History
Version
Notes
0.0.1
Added