An open API service indexing awesome lists of open source software.

https://github.com/britzl/printlogger

print() to stdout and log files
https://github.com/britzl/printlogger

lua

Last synced: 8 months ago
JSON representation

print() to stdout and log files

Awesome Lists containing this project

README

          

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")
```