Skip to main content

My logger library.

Project description

mylog

Hits-of-Code Codacy grade CodeFactor Grade Codecov Code style: black semantic-release PyPI - License PyPI PyPI - Python Version PyPI - Format

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_mylog-0.9.0.tar.gz (24.9 kB view hashes)

Uploaded Source

Built Distribution

python_mylog-0.9.0-py3-none-any.whl (20.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page