How can I redirect the logger to a wxPython textCtrl using a custom logging handler?
|
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. |
||||
|
add a comment
|
|
Create Handler
Then in your control
|
|||||||||
|
|
Here's a simple working example: |
