No project description provided
Project description
⚡ quirtylog ⚡
Quick & dirty logging in python.
Installation
To install the package the simplest procedure is:
pip install quirtylog
Now you can test the installation... In a python shell:
import quirtylog
quirtylog.__version__
Installation from source
Once you have cloned the repository
pip install .
To use the develop mode just write pip install -e .
.
The file pyproject.toml
contains the packages needed for the installation.
The code requires python3.11+
.
Examples
The package creates custom loggers object.
import quirtylog
log_path = "/path/to/logs"
logger = quirtylog.create_logger(log_path=log_path)
It is also possible to create decorators to be used in a user-defined function.
import quirtylog
@quirtylog.measure_time(logger)
def f(x):
"""A function that do nothing"""
return x
@quirtylog.measure_time(logger)
def g(x):
"""A function that raise an exception"""
return x / 0.
It can also be used as a wrapper for external scripts
python -m quirtylog main.py
For further examples see the folder examples
.
Contributing
If you want to contribute to this project, please follow the guidelines in the CONTRIBUTING.md.
Official soundtrack
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
Built Distribution
Hashes for quirtylog-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea6b7708fb083f19d3343b1483b0fb4700b0cea75362f8f1e8b86672605c10aa |
|
MD5 | 02607b82957ef78627f8f8ee522b70c6 |
|
BLAKE2b-256 | 1698422af056a3ab59f3cc1db4f18541c9e3c4106a777f037f5e7dc66109a6e8 |