# Configuration

In your `settings.py` you can customize `django-structlog`.

Example:

    import logging
    DJANGO_STRUCTLOG_STATUS_4XX_LOG_LEVEL = logging.INFO

## Settings

Key | Type | Default | Description
--- | --- | --- | ---
DJANGO_STRUCTLOG_CELERY_ENABLED | boolean | False | See Celery Integration
DJANGO_STRUCTLOG_IP_LOGGING_ENABLED | boolean | True | automatically bind user ip using django-ipware
DJANGO_STRUCTLOG_STATUS_4XX_LOG_LEVEL | int | logging.WARNING | Log level of 4XX status codes
DJANGO_STRUCTLOG_STATUS_5XX_LOG_LEVEL | int | logging.ERROR | Log level of 5XX status codes
DJANGO_STRUCTLOG_REQUEST_CANCELLED_LOG_LEVEL | int | logging.WARNING | Log level of request_cancelled messages
DJANGO_STRUCTLOG_COMMAND_LOGGING_ENABLED | boolean | False | See Commands
DJANGO_STRUCTLOG_USER_ID_FIELD | string | `"pk"` | Change field used to identify user in logs, `None` to disable user binding