Python Tea Logger
Tea Logger is a simple logging package for Python.
Install the tealogger
package, available on
Python Package Index (PyPI).
pip install tealogger
Import the tealogger
package to use.
import tealogger
# Set the logging level (optional)
tealogger.setLevel(tealogger.DEBUG)
tealogger.warning("WARNING: Message")
From high (CRITICAL
) to low (DEBUG
).
CRITICAL
= 50FATAL
=CRITICAL
(Do not use, useCRITICAL
instead)ERROR
= 40WARNING
= 30WARN
=WARNING
(Deprecated, useWARNING
instead)INFO
= 20DEBUG
= 10NOTSET
= 0EXCEPTION
When creating a child logger, if there are no handler(s) added, it will inherit the handle(s) from the parent. But if the parent logger itself is set to a higher level, the higher level gets respected. Since the parent handler(s) attached to the parent logger only output if the parent logger allows it.