Florian d
11/13/2023, 2:54 PMlogger = CorrelatedLogger.get_logger()
log_handler = AzureLogHandler(connection_string=connection_string)
logger.addHandler(log_handler)
logger.setLevel(logging.INFO)
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 logging.yaml
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 Chan
11/13/2023, 3:04 PMFlorian d
11/13/2023, 3:29 PMincremental: True
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 Chan
11/14/2023, 5:16 AMlogging.yml
2. Debug with logging.dictConfig
directly, which is what Kedro use under the hood. There isn’t too much magic as we relies on the standard logging
module to do the job. https://docs.python.org/3/library/logging.config.html#logging.config.dictConfig