Skip to content
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

Use show_locals False default for rich logging #1726

Merged
merged 2 commits into from
Jul 27, 2022
Merged

Conversation

merelcht
Copy link
Member

@merelcht merelcht commented Jul 26, 2022

Signed-off-by: Merel Theisen merel.theisen@quantumblack.com

Description

When we added rich as our default logger we set show_locals=True to enable display of local variables. However, this can lead to credentials being shown in logs: #1712

Development notes

Instead just use the default value for show_locals which is False.

Checklist

  • Read the contributing guidelines
  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added a description of this change in the RELEASE.md file
  • Added tests to cover my changes

Signed-off-by: Merel Theisen <merel.theisen@quantumblack.com>
@merelcht merelcht marked this pull request as ready for review July 26, 2022 15:28
@merelcht merelcht requested a review from idanov as a code owner July 26, 2022 15:28
Signed-off-by: Merel Theisen <merel.theisen@quantumblack.com>
Copy link
Contributor

@noklam noklam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I think a conservative default make sense here. We should also think about how to let user disable or configure these rich hooks that is installed by default.

Copy link
Contributor

@datajoely datajoely left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the right time to put in some things in pyproject.toml like [tool.kedro.rich] etc?

@merelcht
Copy link
Member Author

Is this the right time to put in some things in pyproject.toml like [tool.kedro.rich] etc?

You mean to configure rich? I think that would make sense, but let's create an issue for it.

@merelcht merelcht merged commit ef7ccb1 into main Jul 27, 2022
@merelcht merelcht deleted the fix/locals-logging branch July 27, 2022 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

logs print credentials if error in catalog with Rich Logging show_locals=True
3 participants