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

landing_worker: set debug level according to verbosity CLI option (bug 1935044) #160

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shtrom
Copy link
Member

@shtrom shtrom commented Dec 2, 2024

No description provided.

@shtrom shtrom requested a review from zzzeid December 2, 2024 05:20
Copy link
Collaborator

@zzzeid zzzeid left a comment

Choose a reason for hiding this comment

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

I am a little hesitant to add this, since management commands generally use self.stdout and self.stderr, along with various self.style additions and interpretations of CommandError. So I think we are mixing those concepts with logging here, which generally does not affect output defined within management commands. I think the intended way to use this is to determine where and when to produce output within a management command (e.g., https://github.com/django/django/blob/main/django/core/management/commands/migrate.py#L198).

Edit: However, if we really want to add this kind of functionality, maybe we can add a base management command class with a custom argument that allows you to set the logging level.

@shtrom shtrom changed the title landing_worker: set debug level according to verbosity CLI option landing_worker: set debug level according to verbosity CLI option (bug 1935044) Dec 3, 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