-
Notifications
You must be signed in to change notification settings - Fork 926
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
Revamp Logging documentations in 0.19 #2665
Conversation
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>
Signed-off-by: Nok <nok.lam.chan@quantumblack.com>
Signed-off-by: Nok <nok.lam.chan@quantumblack.com>
Just to understand, is this documentation meant to be for 0.18.x or for 0.19.0? 🤔 I was expecting the latter but the PR is directed to |
docs/source/logging/logging.md
Outdated
``` | ||
|
||
### Show DEBUG level messages | ||
To see your `DEBUG` level message, you can change the level of log messages that you wish to see in `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.
logging.yml
is no longer included by default, before referencing it in the docs maybe we should include some section/instructions on how to overwrite the default configuration, including where to keep the file and how to use the new env variable KEDRO_LOGGING_CONFIG
docs/source/logging/logging.md
Outdated
By changing the level value to `DEBUG` for the desired logger (e.g., <your_python_package>), you will start seeing `DEBUG` level messages in the log output. | ||
|
||
## Customise Logging | ||
In addition to the `rich` handler defined in Kedro's framework, the [project-side `conf/logging.yml`](https://github.com/kedro-org/kedro/blob/main/kedro/templates/project/%7B%7B%20cookiecutter.repo_name%20%7D%7D/conf/base/logging.yml) defines two further logging handlers: |
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.
conf/logging.yml
will no longer exist - see: #2281 . Additionally console
and info_file_handler
are not included in the default logging setup
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 won't be in the default, we will provide it in a template instead.
docs/source/logging/logging.md
Outdated
`KEDRO_LOGGING_CONFIG` is an optional environment variable that you can use to specify the path of your logging configuration file, overriding the default Kedro's `default_logging.yml`. | ||
|
||
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: | ||
In order to customise logging, you need to specify the path of your logging configuration file via setting the environment variable `KEDRO_LOGGING_CONFIG`, which overrides the default Kedro's `default_logging.yml` For example, you can set `KEDRO_LOGGING_CONFIG` as follows: |
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.
Related to an earlier comment - perhaps we should move this section above any references to a project-side logging configuration.
docs/source/logging/logging.md
Outdated
### Use plain console logging | ||
File-based logging in Python projects aids troubleshooting and debugging. It offers better visibility into application's behavior and it's easy to search. However, it does not work well with read-only system such as [Databricks Repos](https://docs.databricks.com/repos/index.html). | ||
|
||
To enable file-based logging, add `info_file_handler` in your `root` logger as follows in your `conf/logging.yml` as follow: |
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.
Instructions out of date as conf/logging.yml
will be removed
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 not a must but we recommend user to keep their loggging.yml
in conf
. Is it confusing to reference it as conf/logging.yml
or should I just reference it as logging.yml
? @AhdraMeraliQB
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.
I think putting this file in conf
is natural, but we should make it clear that users need to create that file themselves and that it doesn't already exist.
Edit: reading through the generated docs, I think this is clear already 👍
Co-authored-by: Ahdra Merali <90615669+AhdraMeraliQB@users.noreply.github.com>
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>
Signed-off-by: Nok <nok.lam.chan@quantumblack.com>
Signed-off-by: Nok <nok.lam.chan@quantumblack.com>
@stichbury I made the following changes: a383b4d Built doc: https://kedro--2665.org.readthedocs.build/en/2665/
|
Signed-off-by: Jo Stichbury <jo_stichbury@mckinsey.com>
Signed-off-by: Jo Stichbury <jo_stichbury@mckinsey.com>
@noklam I made a pair of commits to this.
I'll let it rebuild but there may be another commit needed if anything links to that docs page, since commit 1 will have broken the internal linking. I had problems rebuilding locally because this is Also, there's one issue I couldn't fix but doesn't seem quite right...I'll leave a comment in the file for you. |
Signed-off-by: Jo Stichbury <jo_stichbury@mckinsey.com>
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 so much better and I am looking forward to getting it into main
in due course.
Signed-off-by: Nok <nok.lam.chan@quantumblack.com>
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.
Awesome work! Haven't tested all the examples manually but everything reads well. Just one comment on the code block formatting:
root: | ||
handlers: [rich] | ||
``` | ||
</code> |
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.
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.
Signed-off-by: Nok <nok.lam.chan@quantumblack.com>
Signed-off-by: Nok <nok.lam.chan@quantumblack.com>
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.
Description
#2664
Development notes
Checklist
RELEASE.md
file