File: logging.rst

package info (click to toggle)
django-auth-ldap 1.2.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 700 kB
  • ctags: 472
  • sloc: python: 1,763; makefile: 89
file content (17 lines) | stat: -rw-r--r-- 599 bytes parent folder | download | duplicates (2)
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 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. Note that this logger is initialized with a level of
NOTSET, so you may need to change the level of the logger in order to get debug
messages.

.. code-block:: python

    import logging

    logger = logging.getLogger('django_auth_ldap')
    logger.addHandler(logging.StreamHandler())
    logger.setLevel(logging.DEBUG)