diff --git a/pdfrw/errors.py b/pdfrw/errors.py index 263cd4d..ef6ab7d 100644 --- a/pdfrw/errors.py +++ b/pdfrw/errors.py @@ -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):