Global Logger¶
Global Logger instance used by Spooq2.
Example
>>> import logging
>>> logga = logging.getLogger("spooq2")
<logging.Logger at 0x7f5dc8eb2890>
>>> logga.info("Hello World")
[spooq2] 2020-03-21 23:55:48,253 INFO logging_example::<module>::4: Hello World
-
initialize
()[source]¶ Initializes the global logger for Spooq with pre-defined levels for
stdout
andstderr
. No input parameters are needed, as the configuration is received viaget_logging_level()
.Note
- The output format is defined as:
- “[%(name)s] %(asctime)s %(levelname)s %(module)s::%(funcName)s::%(lineno)d: %(message)s”For example “[spooq2] 2020-03-11 15:40:59,313 DEBUG newest_by_group::__init__::53: group by columns: [u’user_id’]”
Warning
The
root
logger of python is also affected as it has to have a level at least as fine grained as the logger of Spooq, to be able to produce an output.