A simple utility package for Python logging with colors
Project description
colorlogging
Makes logging colorful!
Example of colorlogging output
Installation
Simply run
pip install colorlogging
Usage
To configure logging, call configure_logging
like so:
import colorlogging
import logging
logger = logging.getLogger(__name__)
def main() -> None:
colorlogging.configure()
logger.info("Hello, world!")
This tool also provides some other helpful display functions:
import colorlogging
colorlogging.show_info("This is a status message", important=True)
colorlogging.show_warning("This is a warning message")
colorlogging.show_error("This is an error message")
This shows the following output:
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
colorlogging-0.0.2.tar.gz
(35.0 kB
view details)
Built Distribution
File details
Details for the file colorlogging-0.0.2.tar.gz
.
File metadata
- Download URL: colorlogging-0.0.2.tar.gz
- Upload date:
- Size: 35.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1d47ca553df59706474296187679655781a80c00d53202617625ada3c3cb890 |
|
MD5 | 688431572c744e279c96233d8ada0cd8 |
|
BLAKE2b-256 | a149b11ed1d66a453a9d948a23e8e91a36c3595007e9a2cf3b259704052f23c1 |
File details
Details for the file colorlogging-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: colorlogging-0.0.2-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae9a3ce3ceca60372569f6acbad7cfd097f812d40596b655c26a74283f9f9faf |
|
MD5 | 893528449904777683128187a7a646f7 |
|
BLAKE2b-256 | 8788ea3a8378de7a78703d5f10bd04a4f83b193e5026a60d29bacec6c899e188 |