Skip to content

Commit

Permalink
fix: really turn off verbose logging from watchdog (#722)
Browse files Browse the repository at this point in the history
* fix: really turn off verbose logging from watchdog

#721 failed to resolve the issue.
It turned dialed down logging for everything except watchdog.
I've tested this and confirmed this new code will work.

* fix lint
  • Loading branch information
SurferJeffAtGoogle committed Aug 12, 2020
1 parent cd886e8 commit a0492bc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions synthtool/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def _setup_logging(color: bool = bool(ColoredFormatter)):
logging.setLoggerClass(LoggerWithSuccess)

# Silence any noisy loggers here.
logging.getLogger("watchdog.observers").setLevel(logging.INFO)


def configure_logger(name: str, color: bool = bool(ColoredFormatter)):
Expand All @@ -48,10 +49,10 @@ def configure_logger(name: str, color: bool = bool(ColoredFormatter)):
log severity.
"""
logger = logging.getLogger(name)
logger.setLevel(logging.INFO)
logger.setLevel(logging.DEBUG)

handler = logging.StreamHandler()
handler.setLevel(logging.INFO)
handler.setLevel(logging.DEBUG)

if color is True and sys.stdout.isatty():
formatter = ColoredFormatter(
Expand Down

0 comments on commit a0492bc

Please sign in to comment.