-
Notifications
You must be signed in to change notification settings - Fork 903
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
How to enable logging automatically #3446
Comments
Not sure about this. There's a myriad mechanisms to manage environment variables, for example:
I'm not sure what makes I think we should stay away from being too smart about the user environment, and let them manage it. The core issue is:
which is a real user problem. But maybe we need to explore other solutions. |
.env
and enable logging automatically
Updated the title to focus more on the logging problem. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Supplement on this, this will be a breaking change - because the config will no longer accept a full path but only the name of the files (or only relative to |
Why is this environment variable necessary? Can we instead observe the project directory for a 'logging.yml' file and use it if found, or default to standard logging options if not? |
I think we should consider @noklam's #3591 seriously, abstain from fiddling with user-specified logging settings (hence avoid #3474 instead of ignoring it), and if the user wants to provide a file-based logging config, they can always do so in their own code and place it wherever they like. It's clear that logging is an ongoing pain (almost 2 years since #1470 was opened), and we haven't yet fully solved it. |
@DimedS IIRC it's because of two conflicting features:
This means that we need to read logging without configloader, and it's very common to put Cc @merelcht |
This issue is partially overlap to #3591
I am particularly interested in your opinion about this @antonymilne. |
Some extra reading material ahead of a TD session: |
I'm a bit out of the loop here and will talk to @noklam to share my thoughts on it all in more detail, but some rough points:
|
Quick 2 cents
|
And
Not sure whether @noklam filled you in on the chat we had about #3657 (there's a brief summary there but not all the details). But I think we should definitely not set the global logging level to Agree that the current |
I notice the discussion in this thread are mainly related to #3591, though they are related and maybe overlapping. I have this comment in #3657 #3657 (comment)
The idea is almost the same what @DimedS suggested, which we try to locate the |
(Not adding to the solution but more sharing my view...) As a user for several years (+5 years) of kedro since the early days before it was even called kedro, I was a bit thrown off that logging was removed by default in 0.19. Personally would still prefer it out of the box enabled by default (instead of having to read the docs to find out how to enable it, I would rather read the docs on how to disable if not needed). Also appreciate my view is one of many out there. To counter Juan's views:
(for) +1 on directing users to current best-practices for logging, including creating official integrations and docs for Sentry, OpenTelemetry
Both would be good in my case but it was really nice that logging was configured out of the box for a standard project, just like how we can choose spark to be part of the starter. Last resort: add documentation on how to configure logging.yaml to replicate old behaviour as we know Thankssss! |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Introduction
Previous discussion:
.env
file to setup logging #2428In previous discussion we banned the idea of introducing
.env
to enable logging, we introduce a new environment variableKEDRO_LOGGING_CONFIG
that user need to set in their environment (maybe in terminal orsettings.py
).With the new
kedro new
flow, whenlogging
is selected, it is not automatically used until user setKEDRO_LOGGING_CONFIG
manually.Context
(Edited: removed discussion above .env since it's off topic and confused people)
One more problem of
KEDRO_LOGGING_CONFIG
is that it's not immediately obvious where should user put this environment. There are many options:~/.bashrc
or it's variant, this way the environment variable is loaded in the beginningsettings.py
is too late)The text was updated successfully, but these errors were encountered: