diff --git a/conservancy_beancount/cliutil.py b/conservancy_beancount/cliutil.py index 2e046954180612252ccc7806d11718ba57b3d339..346a11b169f33ca3bebb64acc7e1755ffad7a97c 100644 --- a/conservancy_beancount/cliutil.py +++ b/conservancy_beancount/cliutil.py @@ -376,10 +376,11 @@ def set_loglevel(logger: logging.Logger, loglevel: int=logging.INFO) -> None: """ if '.' not in logger.name: logger = logging.getLogger() - if loglevel <= logging.DEBUG: - # At the debug level, the rt module logs the full body of every - # request and response. That's too much. - logging.getLogger('rt.rt').setLevel(logging.INFO) + # pdfminer logs debug-like messages at the info level + logging.getLogger('pdfminer').setLevel(max(loglevel, logging.WARNING)) + # At the debug level, the rt module logs the full body of every + # request and response. That's too much. + logging.getLogger('rt.rt').setLevel(max(loglevel, logging.INFO)) logger.setLevel(loglevel) def bytes_output(path: Optional[Path]=None,