Changeset - b074edc538b6
[Not reviewed]
0 1 0
Brett Smith - 3 years ago 2021-01-09 15:09:45
brettcsmith@brettcsmith.org
cliutil: Set floor for pdfminer loglevel.
1 file changed with 5 insertions and 4 deletions:
0 comments (0 inline, 0 general)
conservancy_beancount/cliutil.py
Show inline comments
...
 
@@ -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,
0 comments (0 inline, 0 general)