Redirect logging output using custom logging handler
Posted
by mridang
on Stack Overflow
See other posts from Stack Overflow
or by mridang
Published on 2010-05-12T14:37:12Z
Indexed on
2010/05/12
14:44 UTC
Read the original article
Hit count: 950
Hi Guys,
I'm using a module in my python app that writes a lot a of messages using the logging module. Initially I was using this in a console application and it was pretty easy to get the logging output to display on the console using a console handler. Now I've developed a GUI version of my app using wxPython and I'd like to display all the logging output to a custom control — a multi-line textCtrl. Is there a way i could create a custom logging handler so i can redirect all the logging output there and display the logging messages wherever/however I want — in this case, a wxPython app.
Thanks
© Stack Overflow or respective owner