|
Boost : |
Subject: [boost] Custom logging backend difficulty
From: Kenneth Adam Miller (kennethadammiller_at_[hidden])
Date: 2014-10-27 14:40:22
So, I need malleable logging facilities, and so far I've identified boost's
logging facilities as useful. I've read the docs on logging, and right now
I'm having difficulty achieving what I want-basically, I have a custom
backend, in order that when logging is done, it gets routed to an
alternative destination - over the network namely.
I extended from text_ostream_backend, and basically I'm having the
following trouble:
I don't understand the record_view visitation API. I'd like the ability to
set formatters and what not to remain untouched, but have the final
formatted result sent off else where. I can change this by sending the
string received in the consume function that has to be overrode, but the
values are lost in the record_view.
void consume (const record_view & rec, std::string s);
where I do { send(s); } for the body.
What I think is necessary is just to retain the default behavior of
accepting whatever formatter was specified...
What is the best way to go about achieving what I want?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk