-
Notifications
You must be signed in to change notification settings - Fork 919
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
Add KEDRO_LOGGING_CONFIG
env variable to specific where to read logging.yml
#2535
Add KEDRO_LOGGING_CONFIG
env variable to specific where to read logging.yml
#2535
Conversation
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
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.
Perfect, thank you! Would be nice to add this to the docs, but I'm also ok leaving that for when we've made some of the other changes and we can update the docs all in one go at the end.
RELEASE.md
Outdated
@@ -12,6 +12,7 @@ | |||
# Upcoming Release 0.18.8 | |||
|
|||
## Major features and improvements | |||
* Added `KEDRO_LOGGING_CONFIG` for configuring logging. |
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.
* Added `KEDRO_LOGGING_CONFIG` for configuring logging. | |
* Added `KEDRO_LOGGING_CONFIG` environment variable, which can be used to configure logging from the beginning of the `kedro` process. |
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 looks great 👍
I would be in favour of adding docs in this PR, since it's quite small and without docs the issue wouldn't really be complete yet.
Signed-off-by: Nok <[email protected]>
Signed-off-by: Nok <[email protected]>
Signed-off-by: Nok <[email protected]>
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.
Two minor comments on the docs, but otherwise this looks great! 👍
docs/source/logging/logging.md
Outdated
@@ -17,6 +17,21 @@ The project-side logging configuration also ensures that [logs emitted from your | |||
|
|||
We now give some common examples of how you might like to change your project's logging configuration. | |||
|
|||
## Using `KEDRO_LOGGING_CONFIG` environment variable |
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.
Should this be a top section like this or a subsection? It now looks like all next sections are part of this section.
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.
You are right. I'll make it a sub-section for now. It isn't really a "project-side" configuration anymore since it's global. But at the same time, if you have multiple project you will still likely set this environment variable per project via some .env
file or IDE
settings.
We can re-visit this later since we haven't removed logging
from config_loader
yet.
To use this environment variable, set it to the path of your desired logging configuration file before running any Kedro commands. For example, if you have a logging configuration file located at `/path/to/logging.yml`, you can set `KEDRO_LOGGING_CONFIG` as follows: | ||
|
||
```bash | ||
export KEDRO_LOGGING_CONFIG=/path/to/logging.yml |
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.
Is this the same for Windows users?
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.
It depends, if you are running on bash then it should be the same. I do a quick search that we only mention export
for a few other documentations as well. If we want to add mentions for how to make it work with CMD
we can open a new ticket to do that.
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.
It's fine if it's consistent with how we refer to other environment variables. 👍
Signed-off-by: Nok <[email protected]>
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.
Looks great to me, thank you! 🌟
Signed-off-by: Nok Chan <[email protected]>
Signed-off-by: Nok Chan <[email protected]>
Description
Close #2206
Development notes
KEDRO_LOGGING_CONFIG
Checklist
RELEASE.md
file