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

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

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

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

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 January 14, 2020 19:25
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