Metadata-Version: 2.1
Name: structlog-overtime
Version: 1.0
Summary: Miscellaneous utilities for structlog
Home-page: https://github.com/kierdavis/structlog-overtime
Author: Kier Davis
Author-email: me@kierdavis.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Typing :: Typed
Requires-Python: >= 3.6
Description-Content-Type: text/markdown
Requires-Dist: structlog (>=20.2.0)
Requires-Dist: dataclasses ; python_version < "3.7"
Provides-Extra: dev
Requires-Dist: black ; extra == 'dev'
Requires-Dist: carthorse ; extra == 'dev'
Requires-Dist: flake8 ; extra == 'dev'
Requires-Dist: isort ; extra == 'dev'
Requires-Dist: mypy ; extra == 'dev'
Requires-Dist: pytest ; extra == 'dev'
Requires-Dist: pytest-cov ; extra == 'dev'
Requires-Dist: setuptools (>=38.6.0) ; extra == 'dev'
Requires-Dist: testfixtures ; extra == 'dev'
Requires-Dist: twine ; extra == 'dev'
Requires-Dist: wheel ; extra == 'dev'

# 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 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

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`


