From: <log...@li...> - 2015-03-15 23:25:58
|
Hi all, A silly question, I'm looking to use log4cpp for a data collection system I'm working on. To help in post mortem analysis it's often useful to separate out log messages by some common key to be able to piece out what happened. The system starts multiple transaction state machines each identified by a unique ID, creating them at runtime. They are one-shot, so once complete, the objects are freed. It appears it would make sense for each transaction state machine to have its own log category, as the log messages can then be grepped for and it ensures *every* log message from that log instance will have the ID prepended. It seems I can create as many category objects as I like, but what isn't clear is what happens to the category objects when they're no longer needed: I don't see any way to close them off or destroy them. (I could call delete(&category); but I'm not sure where else the pointer may be used.) Is there a way to remove categories once they're no longer in use? Regards, -- _ ___ Stuart Longland - Systems Engineer \ /|_) | T: +61 7 3535 9619 \/ | \ | 38b Douglas Street F: +61 7 3535 9699 SYSTEMS Milton QLD 4064 http://www.vrt.com.au |