Logger - lnx00/Lmaobox-Library GitHub Wiki
lnxLib.Utils.Logger
Simple logging utility. Every log mode has a dedicated log level. You can set a minimum log level (1 by default) using the .Level field of a Logger instance.
Functions
.new(name)Creates a new Logger instance with the given name.
Fields
.LevelMinimum log level
Methods
:Debug(msg)Used for debugging. (Level 0):Info(msg)Various info messages (Level 1):Warn(msg)Important warning (Level 2):Error(msg)Fatal errors (Level 3)
Example
local Log = Logger.new("Test")
Log:Info("Everything works as intended!")
Log:Warn("...or does it?")
Log:Error("Nope, it doesn't.")
