Skip to content

Add a skip-logging flag to the CLI#263

Merged
Bogdanp merged 1 commit intoBogdanp:masterfrom
whalesalad:feature/skip-logging-flag
Jan 14, 2020
Merged

Add a skip-logging flag to the CLI#263
Bogdanp merged 1 commit intoBogdanp:masterfrom
whalesalad:feature/skip-logging-flag

Conversation

@whalesalad
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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