File: logging.rst

package info (click to toggle)
python-mpd 3.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 476 kB
  • sloc: python: 3,021; makefile: 187; sh: 9
file content (15 lines) | stat: -rw-r--r-- 481 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Logging
-------

By default messages are sent to the logger named ``mpd``::

    >>> import logging, mpd
    >>> logging.basicConfig(level=logging.DEBUG)
    >>> client = mpd.MPDClient()
    >>> client.connect("localhost", 6600)
    INFO:mpd:Calling MPD connect('localhost', 6600, timeout=None)
    >>> client.find('any', 'dubstep')
    DEBUG:mpd:Calling MPD find('any', 'dubstep')

For more information about logging configuration, see
http://docs.python.org/2/howto/logging.html