diff --git a/unstructured/patches/pdfminer.py b/unstructured/patches/pdfminer.py index cc0c7dab21..9e2d12a5da 100644 --- a/unstructured/patches/pdfminer.py +++ b/unstructured/patches/pdfminer.py @@ -60,7 +60,8 @@ def nexttoken(self) -> Tuple[int, PSBaseParserToken]: if not self._tokens: raise token = self._tokens.pop(0) - log.debug("nexttoken: %r", token) + if log.isEnabledFor(10): # logging.DEBUG is 10 + log.debug("nexttoken: %r", token) return token