summaryrefslogtreecommitdiff
path: root/docs/integrations/zconfig.rst
blob: 79d087ac53dca794c232d3824b3f28558315c6e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
ZConfig logging configuration
=============================

`ZConfig
<http://zconfig.readthedocs.io/en/latest/using-logging.html>`_
provides a configuration mechanism for the Python logging module.

To learn more, see:

  http://zconfig.readthedocs.io/en/latest/using-logging.html

To use with sentry, use the sentry handler tag:

.. code-block:: xml

  <logger>
    level INFO
    <logfile>
     path ${buildout:directory}/var/{:_buildout_section_name_}.log
     level INFO
    </logfile>

    %import raven.contrib.zconfig
    <sentry>
      dsn ___DSN___
      level ERROR
    </sentry>
  </logger>

This configuration retains normal logging to a logfile, but adds
Sentry logging for ERRORs.

All options of :py:class:`raven.base.Client` are supported.