Package for printing messages to the console and to the system logger
Project description
print_helper_logger
print_helper_logger provides a Print_Helper class for printing messages to the console and the system logger, with options for using timestamps, colored messages, and different severity levels.
Features
- Print messages with different severity levels: CRITICAL, ERROR, WARNING, INFO, DEBUG.
- Options to include timestamps in messages.
- Colored messages for better visual clarity.
- Log messages to a log file.
- print` function that automatically determines the severity level of the message based on tags included in the message text: , , , and .
Installation
You can install the package using pip once it's published on PyPI: git
pip install print_helper_logger
Usage
from print_helper_logger import Print_Helper, Severity_Level
# Create an instance of Print_Helper
ph = Print_Helper(
severity_level=Severity_Level.INFO,
show_color=True,
show_timestamp=True,
show_logger=True,
filename_logger="log.txt"
)
# Print messages with different severity levels
ph.print_crt("This is a critical message")
ph.print_err("This is an error message")
ph.print_wrn("This is a warning message")
ph.print_inf("This is an informational message")
ph.print_dbg("This is a debug message")
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file print_helper_logger-0.0.5.tar.gz.
File metadata
- Download URL: print_helper_logger-0.0.5.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d96210910298e6ad69bf4a89a068542e6b822d38abb420eaf09f1bf6739b4975
|
|
| MD5 |
72938e231b74766dd3b8bb9e579ba94e
|
|
| BLAKE2b-256 |
8bc7badccc3559771a4380709aa0dc80f057b938109fbee11d3c140eaf69b617
|
File details
Details for the file print_helper_logger-0.0.5-py3-none-any.whl.
File metadata
- Download URL: print_helper_logger-0.0.5-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8209c20f3418949bed1b360f65b829068d8f9748c0f4070b3d02c41a4dd29447
|
|
| MD5 |
989e5f0780c90e1291df02cf517b6fa7
|
|
| BLAKE2b-256 |
2ddb211c64158f6b1ea43d97324027574675d08fe385a2538ed1d85680c11c6a
|