hi, does kedro support out of the box google cloud logging lib in logging formats? I am not clear on the documentation how advanced adding custom handlers is possible or do I have to do it manually? When would it be better to initialize? After or before kedro loading?
This is what I'm refering to https://cloud.google.com/python/docs/reference/logging/latest/std-lib-integration
ah the logging format in logging.yml seems to be the dictConfig format which can also be used to configure google logger, looks like the answer is yes.
I wasn't aware that it was the standard https://docs.python.org/3/library/logging.config.html#logging-config-dictschema
There's a catch though:
Note that since CloudLoggingHandler requires an already initialized Client, you must initialize a client and include it in the dictConfig entry for a CloudLoggingHandler.
So it looks like it would be doable with omegaconfigloader hook in that place - does reading logging conf support omegaconf?
looks like it does not support it
raise ValueError('Unable to configure handler ' ValueError: Unable to configure handler 'console2' ValueError: Unable to set formatter '${foo}' ValueError: Unable to set formatter '${foo:}'
Logging does not support omegaconf out of the box, you can however add additional handler or update it in hooks.
from kedro.framework.project import LOGGING
Does it make sense to update it to enable omegaconf handling of loading that yaml?
We actually went through the opposite path, logging.yml
was one of the config type that behaves just like parameters
or catalog
.
https://github.com/kedro-org/kedro/issues/2426