File: logging.rst

package info (click to toggle)
django-auth-ldap 5.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 464 kB
  • sloc: python: 2,599; makefile: 23; sh: 12
file content (17 lines) | stat: -rw-r--r-- 639 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Logging
=======

:class:`~django_auth_ldap.backend.LDAPBackend` uses the standard Python
:mod:`logging` module to log debug and warning messages to the logger named
``'django_auth_ldap'``. If you need debug messages to help with configuration
issues, you should add a handler to this logger. Using Django's
:setting:`LOGGING` setting, you can add an entry to your config.

.. code-block:: python

    LOGGING = {
        "version": 1,
        "disable_existing_loggers": False,
        "handlers": {"console": {"class": "logging.StreamHandler"}},
        "loggers": {"django_auth_ldap": {"level": "DEBUG", "handlers": ["console"]}},
    }