Module logger
Log messages at different verbosity levels.
Keeps track of the current verbosity level, and outputs log messages that are at or below the current verbosity level.
Info:
- Author: Rajive Joshi
Functions
new ([default_verbosity=ERROR]) | Create a new logger object. |
verbosity ([new_verbosity=nil]) | Get or Set the verbosity level |
fatal (...) | Log messages at the FATAL verbosity level |
severe (...) | Log messages at the SEVERE verbosity level |
error (...) | Log messages at the ERROR verbosity level |
warning (...) | Log messages at the WARNING verbosity level |
notice (...) | Log messages at the NOTICE verbosity level |
info (...) | Log messages at the INFO verbosity level |
debug (...) | Log messages at the DEBUG verbosity level |
trace (...) | Log messages at the TRACE verbosity level |
Fields
SILENT | SILENT verbosity level |
FATAL | FATAL verbosity level |
SEVERE | SEVERE verbosity level |
ERROR | ERROR verbosity level |
WARNING | WARNING verbosity level |
NOTICE | NOTICE verbosity level |
INFO | INFO verbosity level |
DEBUG | DEBUG verbosity level |
TRACE | TRACE verbosity level |
Functions
- new ([default_verbosity=ERROR])
-
Create a new logger object.
Use as many or as few logger objects as needed. For example, different
logger objects could be used for different categories of
capabilities or functionality in a large software package (e.g. UI, Platform,
Connectivity etc.).
NOTE: Any logger object can be used as a factory of logger objects.
Parameters:
- default_verbosity int the default verbosity level of this Logger (default ERROR)
- verbosity ([new_verbosity=nil])
-
Get or Set the verbosity level
Parameters:
- new_verbosity int the new verbosity level. Should be one of the verbosity level constants (default nil)
Returns:
-
int
the verbosity level
- fatal (...)
-
Log messages at the FATAL verbosity level
Parameters:
- ... variadic
- severe (...)
-
Log messages at the SEVERE verbosity level
Parameters:
- ... variadic
- error (...)
-
Log messages at the ERROR verbosity level
Parameters:
- ... variadic
- warning (...)
-
Log messages at the WARNING verbosity level
Parameters:
- ... variadic
- notice (...)
-
Log messages at the NOTICE verbosity level
Parameters:
- ... variadic
- info (...)
-
Log messages at the INFO verbosity level
Parameters:
- ... variadic
- debug (...)
-
Log messages at the DEBUG verbosity level
Parameters:
- ... variadic
- trace (...)
-
Log messages at the TRACE verbosity level
Parameters:
- ... variadic