A simple logging utility.
Project description
loggy
A simple logging utility.
Installation
To install the package locally use the following:
pip install get-loggy
Features
- Color support
- Custom color support (advanced)
- Add additional logging levels
- Optional log stream vs. log file
- Log record format
- Package level logging
Usage
Loggy exists as a simple interface for some standard logging in Python. This is done at the package level, not by name.
from loggy import loggy
log = loggy.get_loggy()
log.info("Something")
>>> 2022-06-21 20:16:39 PM PDT | INFO | something | (<stdin>:1:<module>) |
Advanced usage
Custom colors can be created or added along with custom logging levels.
See the conftest.py
for an example.
Initial setup
The following GitHub secrets will need to be added in order to release the PyPI packages without the CI failing:
TEST_PYPI_API_TOKEN
PYPI_API_TOKEN
These can be generated using the following links:
Running tests
Pytest is used as the test runner. To install and run tests
use the requirements-dev.txt
and execute with pytest
.
Note: Use a virtual environment. The steps to create one are left to the user, there are many packages that accomplish this.
pip install -r requirements-dev.txt
pytest
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
Built Distribution
Hashes for get_loggy-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7172f23b8ec7ad9d7e98e3e6d8dc3c58b512c58e4a6cb231c84810352b88500 |
|
MD5 | ba9951a7ddfd08501f27ab6c07d1f7fd |
|
BLAKE2b-256 | 9af4f2aa8ecc7bb96e090b507c60016c2c69f37e8e488004578dcac9f9cc49cb |