My logger library.
Project description
mylog
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
Please note, that by contributing to mylog, you accept the DCO. More info
Project details
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for python_mylog-0.8.0b1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53d0b94ee7912fdd4e14c73b4391d6ef3741f72867a6c48319b4a8f8baee74c8 |
|
MD5 | fd94f2096d3bdfc2013cd75fc4800b94 |
|
BLAKE2b-256 | dbb21b66100aad2038e446fe4d0aaa978a11f3d66465488fbb219c3e66202ab9 |