Public Member Functions | |
| def | __init__ (self, name) |
| def | create_logger (cls, name) |
| def | init (cls) |
Static Public Attributes | |
| debug = _make_log_method(logging.Logger.debug) | |
| error = _make_log_method(logging.Logger.error) | |
| exception = _make_log_method(logging.Logger.exception) | |
| handler = None | |
| info = _make_log_method(logging.Logger.info) | |
| level = None | |
| warning = _make_log_method(logging.Logger.warning) | |
Private Member Functions | |
| def | _log (cls, func, args, kwargs) |
Static Private Attributes | |
| _custom_name = None | |
Custom logger class that acts like logging.Logger
The logger name is automatically generated by the module of the caller
Usage:
>>> LOG.debug('My message: %s', debug_str)
13:12:43.673 - :<module>:1 - DEBUG - My message: hi
>>> LOG('custom_name').debug('Another message')
13:13:10.462 - custom_name - DEBUG - Another message
|
private |
|
static |
|
static |
|
static |
|
static |
|
static |