Quick & dirty logging package
Project description
⚡ quirtylog ⚡
Quick & dirty logging in python.
The file requirements.txt
contains the packages needed for the installation.
The code requires python3.11+
.
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 .
.
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.
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
quirtylog-0.1.4.tar.gz
(13.6 kB
view hashes)
Built Distribution
quirtylog-0.1.4-py3-none-any.whl
(11.6 kB
view hashes)
Close
Hashes for quirtylog-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75c22ba11a92ef0d4e1d9d94e3e7fba8c1aa81372eefc391207e9fd1d8bae46a |
|
MD5 | a7fc395f464bd32c78df78213eb596f0 |
|
BLAKE2b-256 | 9d13ddc5e8c23bdfd854d85572ae1f2af7fe2d18c04432a30d422f998c9e3ff8 |