mylog
A simple logging library for Python.
Example/Getting started
First, install it with pip install python-mylog
. Need more help?
import mylog
mylog.root.info("Hello, world!")
# Output: <nothing>
# Why? Because the threshold is set to WARNING.
# Try this:
mylog.root.warning("Hello, world!")
# Output: [root WARNING 2023-12-23 13:39:16.127495+00:00 line: 00001] Hello, world!
# Or
mylog.root.threshold = mylog.Level.DEBUG
mylog.root.info("Hello, world!")
# Output: [root INFO 2023-12-23 13:39:34.231029+00:00 line: 00001] Hello, world!
API reference
For the API reference see the docstrings.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Please note, that by contributing to mylog, you accept the DCO. More info