B
bob
Hi,
I have a requirement to "roll" a logfile in a GUI. Namely as each
write to the file occurs, I need to do some filtering (not relevant
here) and then stream the message contents to a graphical user
interface.
Ideally, I would like a callback object/function be to be called each
time a write occurs to the file associated with the stream. Ive
checked about and I cant really see anything out of the box.
I see that there is a "ios_base::register_callback" method available
however i don't think thats what I'm looking for. It provides the
following events, copyfmt_event, erase_event and imbue_event. I don't
think any of these trigger the registered function to be called when a
"write" to the stream occurs.
Perhaps I need to look at a different structure/object. In any case,
I'd be grateful if anybody could direct me to the correct approach for
getting notified each time a write to the file occurs.
thanks much and have a nice day
GrahamO
I have a requirement to "roll" a logfile in a GUI. Namely as each
write to the file occurs, I need to do some filtering (not relevant
here) and then stream the message contents to a graphical user
interface.
Ideally, I would like a callback object/function be to be called each
time a write occurs to the file associated with the stream. Ive
checked about and I cant really see anything out of the box.
I see that there is a "ios_base::register_callback" method available
however i don't think thats what I'm looking for. It provides the
following events, copyfmt_event, erase_event and imbue_event. I don't
think any of these trigger the registered function to be called when a
"write" to the stream occurs.
Perhaps I need to look at a different structure/object. In any case,
I'd be grateful if anybody could direct me to the correct approach for
getting notified each time a write to the file occurs.
thanks much and have a nice day
GrahamO