From: Konstantin L. <to....@gm...> - 2009-10-26 13:21:59
|
On 26.10.2009 14:49, S Roderick wrote: >> 3. Collect all events (not LogingEvents) in a rt buffer and send they >> into a sink - serialize and send to socket for example. >> 4. On other side of sink you may have some listener that receive, >> deserialize and invoke log4cpp with preconfigured nonrt >> categories/appenders to do real logging. > > We actually just send LoggingEvents through the buffer. What benefit do > you see with sending events that are not LoggingEvents? Aren't they > going to contain the same data? Can you tell me more about 'send LoggingEvents through the buffer'. From my point of view to decouple rt part from non-rt you should send these event away from rt part in rt manner. Than you should receive it in non-rt agent and replay. > As part of this, you would need to > completely override all the logging functions in RTCategory to take > rt_string objects instead of std::string. No, you shouldn't. > It seems like we would be > completely replacing the Category and LoggingEvent classes, where as > with my current implementation we build a slightly different > LoggingEvent class, and we override just a couple of functions in the > RTCategory class. One of my primary aims going in to this was to reuse > as much of log4cpp as possible. You need to override only one function - _logUnconditionally2 because all other logging functions uses only this one to actually log something. |