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

Add a skip-logging flag to the CLI #263

Merged
merged 1 commit into from Jan 14, 2020

Conversation

whalesalad
Copy link
Contributor

@whalesalad whalesalad commented Jan 12, 2020

This PR adds a skip-logging flag to the CLI invocation arguments.

This came from wanting to adjust the LOGFORMAT of Dramatiq's log messages. I wanted to eliminate the [Thread-X] bit and modify the order of things to better match the rest of my system

logging.basicConfig is a no-op if the root logger has handlers added to it, but due to the fact that the Dramatiq CLI is invoked before any of my code, there is no way to beat that to the punch.

So instead I opted to add a --skip-logging flag that will prevent basicConfig from ever happening. This allows the end user to define the handlers and whatnot without having to undo anything done by Dramatiq's bootup sequence.

Hopefully this is something that is worth merging into the project.

@whalesalad
Copy link
Contributor Author

@whalesalad whalesalad commented Jan 12, 2020

It looks like the CI failure was unrelated to this change.

@Bogdanp Bogdanp merged commit ca442fe into Bogdanp:master Jan 14, 2020
1 check passed
@Bogdanp
Copy link
Owner

@Bogdanp Bogdanp commented Jan 14, 2020

Thank you!

@Bogdanp Bogdanp mentioned this pull request Jan 14, 2020
@whalesalad whalesalad deleted the feature/skip-logging-flag branch Jan 14, 2020
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.

None yet

2 participants