Give queue worker thread a name. #174
Merged
+6
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey @Delgan,
I'm doing some debugging with a multi-threaded application and also have a Loguru sink with
enqueue=True
. (As we've discussed before) this instructs Loguru to manage a thread that processes a queue of log records.Currently, that thread's name is the default one:
https://docs.python.org/3.8/library/threading.html#threading.Thread
For identification purposes, it'd be helpful to see a descriptive name for this thread in environments/debuggers/etc that support listing threads.
The name I've chosen
loguru-writer
.This doesn't affect the operation of the Loguru in any other way:
https://docs.python.org/3.8/library/threading.html#threading.Thread.name