Simple, performant logging with ANSI colors for Python.
Project description
ezlog
Simple, performant logging with ANSI colors for Python.
Published on PyPI as ezlog-py (import as ezlog).
- 5 levels:
error,warn,info,success,debug(no NOTSET/CRITICAL) - Short aliases:
e,w,i,s,d - ANSI colors: red, yellow, cyan, green, magenta
- Stdlib integration: after
init(),logging.info()etc. go through ezlog formatting - Zero dependencies
Install
pip install ezlog-py
Usage
Import only ezlog, call init with the two settings, then use ezlog.log or stdlib logging (both go through ezlog):
import ezlog
ezlog.init(use_colors=True, use_timestamp=True)
# Direct ezlog (includes .success() level)
ezlog.log.success("Application started")
ezlog.log.info("Environment: dev")
ezlog.log.w("Warning")
ezlog.log.e("Error")
ezlog.log.d("Debug")
# Stdlib logging (wired internally; same formatting)
import logging
logging.info("Hello from stdlib")
logging.error("Something failed", exc_info=True)
init (two settings)
| Argument | Default | Description |
|---|---|---|
use_colors |
True |
ANSI colors |
use_timestamp |
True |
ISO timestamp |
Levels
Ezlog has 5 levels: error, warn, info, success, debug.
Stdlib DEBUG/INFO/WARNING/ERROR are mapped to ezlog; NOTSET is skipped, CRITICAL is treated as error.
Exports
init(use_colors=..., use_timestamp=...)– initialize and wire to stdlib logginglog– EzLog instance (set afterinit()); use for direct logging and.success()EzLog– logger class (for custom instances)- Types:
LogLevel,LogColors,EzlogConfig,LevelsConfig,LevelConfig,LogArgs,ConsoleMethod
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
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 ezlog_py-1.0.2.tar.gz.
File metadata
- Download URL: ezlog_py-1.0.2.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7ad405bd572e7e44347ffe25379b8fa53681da9c3557e596f179babee69e655
|
|
| MD5 |
46a1fd0368158cf41fe3e4a090528c8e
|
|
| BLAKE2b-256 |
c4bbee3b7c14013423fa208b7cb550011d9ecc8c22ba4145f29d298d8189e877
|
File details
Details for the file ezlog_py-1.0.2-py3-none-any.whl.
File metadata
- Download URL: ezlog_py-1.0.2-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b40926160289d17ca033e44369682026d70db022dbe9aacb6dab1b199ab72ab
|
|
| MD5 |
7ac7f1efc1da0d6c900726d958d493a0
|
|
| BLAKE2b-256 |
cf272ffe0696a37cdce9c465c92b16b9ebee4e52df30af11e2f9f58a406aca64
|