2eeb3dd27a2a632218fdffdc61cec6db9ea0e14f
[pyassuan.git] / pyassuan / __init__.py
1 # Copyright (C) 2012 W. Trevor King <wking@drexel.edu>
2 #
3 # This file is part of pyassuan.
4 #
5 # pyassuan is free software: you can redistribute it and/or modify it under the
6 # terms of the GNU General Public License as published by the Free Software
7 # Foundation, either version 3 of the License, or (at your option) any later
8 # version.
9 #
10 # pyassuan is distributed in the hope that it will be useful, but WITHOUT ANY
11 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License along with
15 # pyassuan.  If not, see <http://www.gnu.org/licenses/>.
16
17 """A Python implementation of the `Assuan protocol`_.
18
19 .. _Assuan protocol: http://www.gnupg.org/documentation/manuals/assuan/
20 """
21
22 import logging as _logging
23 import logging.handlers as _logging_handlers
24
25
26 __version__ = '0.2'
27
28 LOG = _logging.getLogger('pyassuan')
29 LOG.setLevel(_logging.ERROR)
30 LOG.addHandler(_logging.StreamHandler())
31 #LOG.addHandler(_logging.FileHandler('/tmp/pinentry.log'))
32 #LOG.addHandler(_logging_handlers.SysLogHandler(address='/dev/log'))
33 LOG.handlers[0].setFormatter(
34     _logging.Formatter('%(name)s: %(levelname)s: %(message)s'))