Single-file, zero-dependency, highly compatible logger
Project description
rvid.log - a nice single-file logger
Single-file, zero-dependency, highly compatible logger with useful defaults and convenient features.
My only real objections against the basic logging functionality in Python stdlib are that its default formatter doesn't have the basic information I always want and that it is too fiddly to adjust log levels.
You can just copy the single file into any project and name it anything.
Example
$ cat > test.py <<EOF
from rvid.log import getLogger
log = getLogger(name=None)
log.info("This is informational")
log.debug("This is mostly noise")
EOF
$ python test.py
[2026-03-07 23:30:39] INFO [test.py] This is informational
$ LOGGING_LEVEL=DEBUG python test.py
[2026-03-07 23:31:46] INFO [test.py] This is informational
[2026-03-07 23:31:46] DEBUG [test.py] This is mostly noise
$ LOGGING_PATH=test.log python test.py
$ cat test.log
[2026-03-07 23:31:59] INFO [test.py] This is informational
Other features
- Extra levels
TRACE(belowDEBUG) andIMPORTANT(betweenWARNINGandERROR). - You can set log-level by logger-name, simply add more text after
LOGGING_LEVEL like this:
LOGGING_LEVEL_MYPACKAGE_SUBPACKAGE=DEBUG. and now loggers with name "mypackage.subpackage" will have DEBUG level but all others are left on default. You can have as many of these variables as you want in your environment. - Allows output to multiple sinks from single logger
- Single central flip to switch, if you wish to route all log statements through stdlib logging instead.
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 Distributions
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 rvid_log-0.0.2-py3-none-any.whl.
File metadata
- Download URL: rvid_log-0.0.2-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b60823b3119dc0dfcd503dacefca04c42579119beeb2fc4824115d65b2e6b14b
|
|
| MD5 |
765a9b80e8dcddb6a9df4280510a5752
|
|
| BLAKE2b-256 |
679dcb8b733c4dff5c2483b9eabc186e3d14f27f10aa92939f414c1b69547989
|