From fac228567eeaf6b15b196b82c7f294ff682d464e Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Mon, 12 Oct 2020 11:59:13 -0500 Subject: [PATCH] Fix logging in _validate_log_json Just use the app logger since that has the default LogFormatter logging until we change it to JSON. --- notebook/notebookapp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notebook/notebookapp.py b/notebook/notebookapp.py index 65ce50bcf..50f1d374a 100755 --- a/notebook/notebookapp.py +++ b/notebook/notebookapp.py @@ -730,14 +730,14 @@ class NotebookApp(JupyterApp): if value: try: import json_logging - self.log.info('initializing json logging') + self.log.debug('initializing json logging') json_logging.init_non_web(enable_json=True) self._log_formatter_cls = json_logging.JSONLogFormatter except ImportError: # If configured for json logs and we can't do it, log a hint. # Only log the error once though. if not self._json_logging_import_error_logged: - logging.getLogger(__name__).warning( + self.log.warning( 'Unable to use json logging due to missing packages. ' 'Run "pip install notebook[json-logging]" to fix.' )