Logging module with the minimum necessary functionality.
The log.lua file should be dropped in to an existing project and required by it.
log = require "log"
The Log module provides 6 functions, each function displays all its arguments to the console and also outputs them to the log file, if one is set.
- log.trace(...)
- log.debug(...)
- log.info(...)
- log.warn(...)
- log.error(...)
- log.fatal(...)
Log object provide some variables for setting additional options.
- log.color - Indicates that we will use color output in the terminal(default is
true
) - log.file - Path to log file(default is
nil
no log file) - log.level - Default and minimum log level, it can also be as numerical values according to the simbolic level(default is set to
trace
)
See Copyright.txt file for details