Logging Handler + supervisord + unbuffer + tail #1296
Unanswered
singlecheeze
asked this question in
General
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.
Uh oh!
There was an error while loading. Please reload this page.
-
What a WONDERFUL project! Thank you!
I'm running supervisord and that is writing from the python log handler to a file. I wanted colorized output while tail'ing the log file via SSH and there is an easy solution.
It would be very helpful to add to your docs here a note on the below: https://rich.readthedocs.io/en/stable/logging.html#logging-handler
Install expect (Or using whatever package manager of choice for your system; expect-dev is not required)
sudo apt install expect
Supervisord.conf
Rich logging handler:
log.error("[bold red blink]Server is shutting down![/]", extra={"markup": True})
Reload supervisord
sudo supervisorctl reload
Tail your log file! 🎉
tail -f log.txt
Stack answers here and here that led me to the solution
Beta Was this translation helpful? Give feedback.
All reactions