Replies: 1 comment
-
I have added a PR to enable this |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I just started using rich today and have added RichHandler to my application (https://github.com/craigerl/aprsd) to output some 'rich' logging output. From what I can tell there is no way to specify the formatting of the log messages? I want the log to show the Thread Name as part of the log format. My app has many threads that come and go and I want to see the thread name as part of each log statement.
Is there a way to get either specify the log format details as you normally do with python logging or to enable the showing of the thread name?
The default python logging package has the ability to show thread name if you specify it in the formatter such as my app here:
https://github.com/craigerl/aprsd/blob/master/aprsd/config.py#L28-L31
I tried doing this:
But this is the output, which isn't correct:
As you can see I get the timestamp and log level from RichHandler, then the format of the output from python logging.
I would be ok with just going with the formatting from RichHandler itself if I had a way to get the thread name included in the output.
Beta Was this translation helpful? Give feedback.
All reactions