Skip to content

koviubi56/mylog

mylog

Hits-of-Code Codecov Code style: black semantic-release PyPI - License PyPI PyPI - Python Version PyPI - Format PyPI - Implementation GitHub Workflow Status Tests

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

GNU GPLv3.0+

Please note, that by contributing to mylog, you accept the DCO. More info