-
Notifications
You must be signed in to change notification settings - Fork 962
Closed
Labels
Milestone
Description
Currently Kedro has some issues with the logging setup, which can cause some problems from minor annoyances to failures to run a Kedro project in certain environments. Here is a small list of the problems our current logging setup causes:
- Kedro logs at root level, rather than
kedro.*
in many places root
log level is set toINFO
instead ofWARNING
on all official starters- on read-only file systems Kedro projects fail to execute, rather than just failing to write the logs
KedroSession
logs useless things atINFO
level, like e.g. that the default session store doesn’t have aread()
method andgit describe
failures…- maybe I am mistaken, but I think Kedro logs things before the logging config is setup (to be confirmed).
- CLI commands output too many things, e.g. when you do
kedro catalog list
it should only show the output so it can be machine readable, but now there's lots ofDEBUG
level worthy output - kedro leaves
info.log
files everywhere for unknown reasons (easiest to notice is when runing a notebook innotebooks/
) - Kedro-Airflow not working with Astrocloud kedro-plugins#13
In order to address those issues, we need to work on the following:
- User research to see if we should remove the file-based logging handlers #1472
- Alter framework logging.yml configuration #1470
- Ensure
logging.yml
is optional and tidy logging config #1469 - Revisit the levels of all logging in Kedro #1473
- Write documentation on how to make a custom logging.yml in your project #1474
-
Remove file handlers, special casekedro.framework.cli.hooks.manager
handler and add documentation on how to setup logging with them (only if User research to see if we should remove the file-based logging handlers #1472 shows we should remove them) - Get parallel runner to recognise framework-side logging config #1558
- Change default logging.yml to use RichHandler 1: initial setup #1512
- Change default logging.yml to use RichHandler 2: fancy tracebacks #1513
- Change kedro log messages to be more rich #1514
- Disable rich logger in Jupyter #1575
- Deprecate ColorHandler logger #1515
- Improve kedro-telemetry logging kedro-plugins#31
- Update key docs to show richly formatted logs #1683
- Consider whether to set
spaceflights
log level toINFO
on framework-side rather than project. Like point 2 of Ensurelogging.yml
is optional and tidy logging config #1469. Needs to usePACKAGE_NAME
? - Work out whether we should have a verbosity flag to change logging level (note we already have a verbosity option on some commands, but it looks like it only changes how detailed
KedroCliError
message is). Otherwise there's no way you will seeDEBUG
level messages emitted by logging calls beforesession._setup_logging
is called, even if you alter your project logging.yml to showDEBUG
level messages. e.g. https://hydra.cc/docs/tutorials/basic/running_your_app/logging/ - The road to introducing
rich
into Kedro natively #1464 - Make
rich
traceback and REPL handling more configurable #1728 - should rich stuff be moved to hooks anyway? See also my thoughts on spark hooks
antonymilne, merelcht, SajidAlamQB, noklam and datajoely