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

feat: purge log fix (SYNC-4250) #1552

Closed
wants to merge 3 commits into from
Closed

Conversation

jrconlin
Copy link
Member

@jrconlin jrconlin commented May 1, 2024

Description

Fix up the discrepant logging in purge_old_records.py

Testing

How should reviewers test?

Issue(s)

Closes SYNC-4250

@jrconlin jrconlin requested review from pjenvey and taddes May 1, 2024 18:00
Copy link
Member

@pjenvey pjenvey left a comment

Choose a reason for hiding this comment

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

It seems the original problem is that purge_old_records had extra module level logging initialization added at some point instead of solely relying on util.configure_script_logging like the other scripts.

We shouldn't need logging setup before the configure_script_logging call as the scripts only do one thing beforehand: parse the command line arguments.

Maybe configure_script_logging should use basicConfig but seems fine as is for e.g. process_account_events (note to myself: logging.getLogger("") is getting the root logger)? So I'd argue it doesn't need changes and all that's needed here is to remove purge_old_records 4 lines of module level initialization code and rely on the verbosity count command line arg to drive the log level.

@pjenvey
Copy link
Member

pjenvey commented May 8, 2024

So I'd argue it doesn't need changes and all that's needed here is to remove purge_old_records 4 lines of module level initialization code and rely on the verbosity count command line arg to drive the log level.

Err, I guess #1555 pretty much does this. Maybe this one should be closed in favor of it

@jrconlin
Copy link
Member Author

jrconlin commented May 9, 2024

Yeah, forgot to close out this PR in favor of that one. Sorry.

@jrconlin jrconlin closed this May 9, 2024
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.

2 participants