Florian d11/13/2023, 2:54 PM
We then create a kedro session to get the catalog and load some datasets (we have to use a session because of certain hooks to allow us to load datasets). However, the creation of the session and loading of the associated
logger = CorrelatedLogger.get_logger() log_handler = AzureLogHandler(connection_string=connection_string) logger.addHandler(log_handler) logger.setLevel(logging.INFO)
completely breaks the logging config of the CorrelatedLogger … If I add the same logging config as in the snippet above after the kedro session was closed again. It all works. I did not expect the loading of the kedro project logging config to break any existing logging handlers or setup. Anyone got an idea?
Nok Lam Chan11/13/2023, 3:04 PM
Florian d11/13/2023, 3:29 PM
I get the following
File "/anaconda/envs/test/lib/python3.9/logging/config.py", line 508, in configure raise ValueError('No handler found with ' ValueError: No handler found with name 'console'
There is a line in the logging file that disable existing logger IRRCThis is set to False so I would expect nothing to happen to existing loggers
Nok Lam Chan11/14/2023, 5:16 AM
2. Debug with
directly, which is what Kedro use under the hood. There isn’t too much magic as we relies on the standard
module to do the job. https://docs.python.org/3/library/logging.config.html#logging.config.dictConfig