Graylog middleware for Django.
Project description
django-graylog
A Django middleware for logging requests to Graylog.
Installation
pip install django-graylog
Configuration
Simply add django_graylog.GraylogMiddleware
to your MIDDLEWARE
setting, after
django.middleware.common.CommonMiddleware
. By default, the middleware does nothing unless GRAYLOG_ENDPOINT
is set
(see below).
Settings
GRAYLOG_ENDPOINT
- An HTTP/HTTPS endpoint to send GELF logs to. For example,http://yourserver:12201/gelf
.GRAYLOG_NODE
- The middleware sends a_node
field that defaults tosocket.gethostname
. Set this to override it.GRAYLOG_LEVEL
- The defaultlevel
to send for log entries. Defaults to 6 (INFO).
Advanced Usage
In addition to the standard logging middleware, django_graylog
installs an object on your request objects
(request.graylog
) that has standard logging methods for recording per-request logs. You may also set custom keys on
this object (request.graylog["key"] = "value"
) that will be included in log entries.
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
Close
Hashes for django_graylog-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7c5b4990d7a833da88d422c484bfaa06b1b0221ac487d23506f060cc5cb8f85 |
|
MD5 | c60094239d72c374cd92dfc938041002 |
|
BLAKE2b-256 | 5c6d3c62a336ec52f85dfd8eb6da3e98f5e3ba9b8d0412813d2299004310b7c4 |