Metadata-Version: 2.1
Name: django-structlog-duration
Version: 0.0.1
Summary: Add request duration to django-structlog request log.
Home-page: https://github.com/tm-kn/django-structlog-duration
License: MIT
Author: Tomasz Knapik
Author-email: tomasz@knapik.net
Requires-Python: >=3.7,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: System :: Logging
Requires-Dist: django-structlog (>=4,<5)
Project-URL: Repository, https://github.com/tm-kn/django-structlog-duration
Description-Content-Type: text/markdown

# django-structlog-duration

If you use [django-structlog](https://github.com/jrobichaud/django-structlog), this is a little extension that will populate the `request_finished` log with the duration of the request (`request_duration`).

## Installation

Install the package.

```sh
pip install django-structlog-duration
```

Configure the middleware.

```python
MIDDLEWARE = [
    "django_structlog_duration.StartTimer",
    # ...
    "django_structlog.middlewares.RequestMiddleware",
    "django_structlog_duration.StopTimer",
]
```
