Kedro default logging seems to remove other handlers?
See original GitHub issueDescription
Kedro default logging will remove other handlers.
Context
I am using clearml which is a tool for experiment tracking. It would normally log my program STDOUT included print message or logging.info() stuff. I found that when I am using Kedro with it, the log is sent to clearml properly.
ClearML: https://github.com/allegroai/clearml
Steps to Reproduce
The standard logging config provided by Kedro is this
This is a minimal snippet to reproduce the issue. To see the log properly, uncomment the line # "incremental": True,. I have written a short summary ofthis issue here. In short, the default is incremental: False which seems to remove the existing handler.
to run this, you need to install two package
pip install kedro clearml
import logging
from clearml import Task
conf_logging = {
# "incremental": True,
"disable_existing_loggers": False,
"version":1,
"formatters":{
"simple":{
"format":"%(asctime)s - %(name)s - %(levelname)s - %(message)s"}
}
}
t = Task.init(project_name="test")
logging.config.dictConfig(conf_logging)
logging.warning("WARN!")
print("PRINT!")
Expected Result
Log should show up in the ClearML App
Actual Result
Log is missing
-- If you received an error, place it here.
-- Separate them if you have more than one.
Your Environment
Include as many relevant details about the environment in which you experienced the bug:
- Kedro version used (
pip show kedroorkedro -V): kedro 0.16.6 - Python version used (
python -V): 3.7 - Operating system and version: Window 10
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)

Top Related StackOverflow Question
@noklam You are right, this is a more general issue, and it would be nice if it were possible for kedro to set its own handlers without affecting existing ones. Unfortunately I don’t think there is any better option than using
dictConfighere - as I understand it, this is just a general problem with Python logging handlers.I think the best solution will be to leave the default logging.yaml as it is and add a note to the documentation about this.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.