Reputation: 1
I’m trying to design a log message window, that collects the logs from all modules and displays it. There is a custom handler that redirects logs into wx.textctrl and displays it. Instead I'm looking for a different custom handler which redirects the logs as list and I should be able to select either INFO, ERROR, DEBUG,WARNING or ALL messages based on button click. Any hint will be helpful. enter image description here
Upvotes: 0
Views: 148
Reputation: 22688
It's not very clear what exactly is this question about, so the answer can only be relatively general, but maybe this could still be useful, so:
In C++ you can do this by defining your own class deriving from wxLog
and overriding its DoLogRecord()
method, which allows you to get access to different fields of the log record (e.g. text and time are separate) as well as to the log level.
This class would use either wxListCtrl
or wxDataViewCtrl
to show the records, with different fields in the different columns.
Upvotes: 1