-
Notifications
You must be signed in to change notification settings - Fork 912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decouple logging
from ConfigLoader
#2642
Conversation
Signed-off-by: Nok Chan <nok.lam.chan@quantumblack.com>
Signed-off-by: Nok Chan <nok.lam.chan@quantumblack.com>
Signed-off-by: Nok Chan <nok.lam.chan@quantumblack.com>
Signed-off-by: Nok Chan <nok.lam.chan@quantumblack.com>
Signed-off-by: Nok Chan <nok.lam.chan@quantumblack.com>
Signed-off-by: Nok Chan <nok.lam.chan@quantumblack.com>
I see the target branch is |
Signed-off-by: Nok Chan <nok.lam.chan@quantumblack.com>
@astrojuanlu It's for 0.19.0 so it's in I haven't finished the doc change though. |
Signed-off-by: Nok Chan <nok.lam.chan@quantumblack.com>
Signed-off-by: Nok Chan <nok.lam.chan@quantumblack.com>
Signed-off-by: Nok Chan <nok.lam.chan@quantumblack.com>
Signed-off-by: Nok Chan <nok.lam.chan@quantumblack.com>
Signed-off-by: Nok Chan <nok.lam.chan@quantumblack.com>
Noted the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few initial comments for now - I need to check through the codebase more carefully to see if there's anything else to do. But this looks great and is a huge improvement to kedro 💯
One thing I think is missing is that we can remove the logging.yml file from the project template now.
I think we should probably save the docs for a separate PR because it's a big rewrite, but up to you 🙂
Co-authored-by: Antony Milne <49395058+antonymilne@users.noreply.github.com>
Signed-off-by: Nok Chan <nok.lam.chan@quantumblack.com>
@antonymilne I will leave the big doc changes for the separate PR and keep it minimal in this PR. |
…o feat/divorce-logging Signed-off-by: Nok Chan <nok.lam.chan@quantumblack.com>
Signed-off-by: Nok Chan <nok.lam.chan@quantumblack.com>
…o feat/divorce-logging Signed-off-by: Nok Chan <nok.lam.chan@quantumblack.com>
Signed-off-by: Nok Chan <nok.lam.chan@quantumblack.com>
Signed-off-by: Nok Chan <nok.lam.chan@quantumblack.com>
I have addressed the comments and remove the logging template |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a huge improvement, thank you! 🙏 I would recommend picking up #2520 next so then we've got all the logging code changes complete and then write the docs after that.
When it comes to writing docs, we should be able to make the page MUCH simpler. Basically it would be something like:
- By default kedro, uses
rich
for logging. For the full setup, look at thedefault_logging.yml
file - If you want to change this then make your own
logging.yml
file. We recommend you put that file inconf
. Then setKEDRO_CONFIG_LOGGING
environment variable to point to it - Show some of the things you might like to change and the code needed to do it:
a. Turn off rich tracebacks
b. Turn on file logging
c. Show DEBUG level messages
No need to explain the difference between framework-side and logging-side configuration or any of that confusing stuff any more 🎉
@antonymilne This sounds great! I think we may also need to revisit some deployment/databricks documentation too. I have open a ticket #2664 |
kedro/framework/session/session.py
Outdated
@@ -162,7 +156,7 @@ def create( # pylint: disable=too-many-arguments | |||
conf_source=conf_source, | |||
) | |||
|
|||
# have to explicitly type session_data otherwise mypy will complain | |||
# have to explicitlyv type session_data otherwise mypy will complain |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small typo here
Signed-off-by: Nok <nok.lam.chan@quantumblack.com>
Signed-off-by: Nok <nok.lam.chan@quantumblack.com>
Signed-off-by: Nok <nok.lam.chan@quantumblack.com>
Description
Fix #2426
related:
conf/base/logging.yml
toconf/logging.yml
#2644 This has to be done later as we cannot change starters now.Following #2281 we have decided that users will no longer be able to change logging configuration dependent on kedro run environment. This is a huge simplification and means that logging only gets configured once in the kedro process with
LOGGING = _ProjectLogging()
.There's a few things to be done here, but they all need to be done at the same time or it will be very confusing.
KedroSession._setup_logging
andKedroSession._get_logging_config
🥳config_patterns
and docstring examples)logging
throughout the whole codebase. Note thatconfigure_logging
must stay since it's needed by the parallel runnerKEDRO_LOGGING_CONFIG
is set to point to itlogging.yml
for advance users who may want to customise logging.Development notes
Checklist
RELEASE.md
file