Ability to re-print RichHandler log files with rich format? (python) #3800
Unanswered
KardoPaska
asked this question in
Q&A
Replies: 0 comments
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 friends:
I like Rich a lot for live logging, but later, I do not like reading my log file in black and white.
I am wondering if there is a way to reprint existing log files that were written by a RichHandler (via python's
logging.FileHandler
)?In other words, how to go both ways? Can write the log lines to a file and Rich print to console very nicely. But how can read from a file and also Rich print to console the log lines as they were originally?
Rich does well and prints this:

But when i look at the log file it looks like this:

And when i try to replay it, looks like this:

Here is my minimum reproducible example from excerpted code to illustrate the idea. Please forgive any omissions, i pluck it out of my production code right now.
Beta Was this translation helpful? Give feedback.
All reactions