Debug and logging utility with colored output and timers.
Project description
pydelog
pydelog is a lightweight, colorful, and simple debug/logging utility for Python.
It provides:
- Colored logs
- Multiple log levels
- A built-in timer decorator
- Easy and clean integration
Installation
pip install pydelog
Basic Usage
from pydelog import DebugUtils
DebugUtils.log_i("Information message")
DebugUtils.log_e("Error occurred!")
DebugUtils.log_w("This is a warning")
DebugUtils.log_d("Debug message")
Timer Example
from pydelog import DebugUtils
@DebugUtils.timer
def sample_task():
for _ in range(1000000):
pass
sample_task()
Output:
[DEBUG] sample_task executed in 0.123456s
Disable Colors or Logs
Disable colored output:
from pydelog import DebugUtils
DebugUtils.ENABLE_COLOR = False
Disable all logs:
DebugUtils.ENABLE_LOGS = False
Available Log Levels
from pydelog import DebugUtils, LogLevel
DebugUtils.log_i("Info")
DebugUtils.log_e("Error")
DebugUtils.log_d("Debug")
DebugUtils.log_f("Fatal")
DebugUtils.log_c("Critical")
DebugUtils.log_w("Warning")
DebugUtils.log_t("Trace")
DebugUtils.log_v("Verbose")
DebugUtils.log_s("System")
DebugUtils.log_a("Alert")
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
pydelog-1.0.0.tar.gz
(2.9 kB
view details)
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 pydelog-1.0.0.tar.gz.
File metadata
- Download URL: pydelog-1.0.0.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea401925d82ac30413a18391995225cc742999c7232bab0a7f54dd62adf77561
|
|
| MD5 |
f3cae13185ec16c63074a6aba7293e07
|
|
| BLAKE2b-256 |
d8c71a4e9bd640b918962ece4f40a0ed3e266a32f2ceb4f661c52276d9ab2ea2
|
File details
Details for the file pydelog-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pydelog-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
384bdb1274614267c1e1d73892d122ead171b48d7c493b6f17ee505395e7cb2a
|
|
| MD5 |
24070135cedbfc2d135a838572852f2f
|
|
| BLAKE2b-256 |
ca1958090cf8a2ea3e65e4a0b21bd5b4f2435cb6cc67c6e1281558b660504144
|