Skip to main content

My logger library.

Project description

mylog

Codacy Badge CodeFactor Build Status codecov Linting 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?

For demonstration purposes only! Output may not be the same as shown here!

import mylog

logger = mylog.root.get_child()

logger.info("Hello, world!")
# Returns: 0
# Output: <nothing>
# Why? Because the threshold is set to WARNING.

# Try this:
logger.warning("Hello, world!")
# Returns: 70
# Output: [WARNING Sun Mar 27 18:56:57 2022 line: 00001] Hello, world!

# Or
logger.threshold = mylog.Level.debug
logger.info("Hello, world!")
# Returns: 67
# Output: [INFO Sun Mar 27 18:58:40 2022 line: 00001] Hello, world!

API reference

You can find the API reference in our wiki.

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 LGPLv3.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.8.0b1.tar.gz (16.9 kB view hashes)

Uploaded Source

Built Distribution

python_mylog-0.8.0b1-py3-none-any.whl (11.3 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