britzl / printlogger

print() to stdout and log files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

printlogger

print() to stdout and log files

example

require("printlogger")

print.set_log_level("CUSTOM", io.open("customlevel", "wa"))

print("This will be printed and logged using the default log level (DEBUG)")
print(print.CUSTOM, "This will end up in the custom file")
print(print.WARN, "This will end up in the warning file")
print(print.DEBUG, "This will end up in the debug file")
print.set_log_level(print.DEBUG, nil) -- disable the debug level
print(print.DEBUG, "This will NOT be logged")

About

print() to stdout and log files

License:Apache License 2.0


Languages

Language:Lua 100.0%