Miscellaneous utilities for structlog
Project description
structlog-overtime
Utilities for structlog with the goal of enabling complex use cases without having to defer to standard library logging.
Features
- TeeLoggerFactory: copy events to multiple destinations (e.g. console and file)
- MockLoggerFactory: accumulates events in a list (useful for tests)
- FilterMethods: filter events based on the method that was called (i.e. filter by log level)
- FilterKeys: adjust which fields are included in your event dicts
- TimezoneAwareTimeStamper: make your timestamps explicitly include a timezone
- bind: type-preserving wrapper around BoundLogger.bind
- noop: a processor that gloriously does nothing
The name?
https://www.youtube.com/watch?v=GnEmD17kYsE
Development
Running the tests
git clone git@git:kdavis/structlog-overtime.git
cd structlog-overtime
python3 -m venv .venv
source .venv/bin/activate
pip install -e '.[dev]'
pytest
Making a release
- Bump the version number in
setup.py
- Commit the version nummber change:
git commit
- Publish to PyPI and create git tag:
carthorse --config carthorse.yaml
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
structlog-overtime-1.0.tar.gz
(5.3 kB
view hashes)
Built Distribution
Close
Hashes for structlog_overtime-1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18380d468fd9c4caa0324c6bb6389081b4de899f9b0d259c91831a1c48ff8210 |
|
MD5 | 59b986016e655bc9343fe354991140c0 |
|
BLAKE2b-256 | 0cccc1a96508cc07d417f75e80257e679ea69d9941e2c3c86c25eda98ef91de9 |