Skip to content

Commit

Permalink
Fix logging (do not touch root logger)
Browse files Browse the repository at this point in the history
  • Loading branch information
b4stien committed Dec 13, 2015
1 parent 5c33301 commit 8e6c6f0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pdfrw/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@
import logging


logging.basicConfig(
format='[%(levelname)s] %(filename)s:%(lineno)d %(message)s',
level=logging.WARNING)
fmt = logging.Formatter('[%(levelname)s] %(filename)s:%(lineno)d %(message)s')

handler = logging.StreamHandler()
handler.setFormatter(fmt)

log = logging.getLogger('pdfrw')
log.setLevel(logging.WARNING)
log.addHandler(handler)


class PdfError(Exception):
Expand Down

0 comments on commit 8e6c6f0

Please sign in to comment.