Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kierdavis/structlog-overtime
https://github.com/kierdavis/structlog-overtime
logging python structlog
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/kierdavis/structlog-overtime
- Owner: kierdavis
- License: unlicense
- Created: 2021-02-17T15:29:02.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-03T10:16:10.000Z (almost 4 years ago)
- Last Synced: 2024-10-18T16:22:06.133Z (4 months ago)
- Topics: logging, python, structlog
- Language: Python
- Homepage:
- Size: 25.4 KB
- Stars: 5
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# structlog-overtime
Utilities for structlog with the goal of enabling complex use cases without
having to defer to standard library logging.## Features
* [TeeLoggerFactory](./structlog_overtime/tee.py): copy events to multiple destinations (e.g. console and file)
* [MockLoggerFactory](./structlog_overtime/mock.py): accumulates events in a list (useful for tests)
* [FilterMethods](./structlog_overtime/filter.py): filter events based on the method that was called (i.e. filter by log level)
* [FilterKeys](./structlog_overtime/filter.py): adjust which fields are included in your event dicts
* [TimezoneAwareTimeStamper](./structlog_overtime/timestamper.py): make your timestamps explicitly include a timezone
* [bind](./structlog_overtime/bind.py): type-preserving wrapper around BoundLogger.bind
* [noop](./structlog_overtime/noop.py): a processor that gloriously does nothing## The name?
https://www.youtube.com/watch?v=GnEmD17kYsE
## Development
### Running the tests
```sh
git clone [email protected]:kierdavis/structlog-overtime.git
cd structlog-overtime
python3 -m venv .venv
source .venv/bin/activate
pip install -e '.[dev]'
pytest
```### Making a release
1. Bump the version number in `setup.py`
2. Commit the version nummber change: `git commit`
3. Publish to PyPI and create git tag: `carthorse --config carthorse.yaml`## License
[public domain](./UNLICENSE)