Skip to main content

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 (below DEBUG) and IMPORTANT (between WARNING and ERROR).
  • 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rvid_log-0.0.1-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file rvid_log-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: rvid_log-0.0.1-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

Hashes for rvid_log-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e0a7f92162a641c45a68db884538d797cd894f87f45f5ae3019f533d807e07e9
MD5 e380e22ff45db9da9aa1d869a309dfe2
BLAKE2b-256 6ffb7506b4358aa5b54ad0e3da359955999ff9ae90182388aca470767ca4f606

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page