If your concern is avoid unnecessary conversions . Use the LOG4CXX_DEBUG etc macros and a ToString method.
// some stringizing method for Foo std::string ToString(const Foo&) { ... }
...
Foo myFoo();
// ToString is not executed unless logger->isDebugEnabled() == true LOG4CXX_DEBUG(logger, ToString(myFoo));
On Aug 27, 2004, at 12:21 PM, Jack Strohm wrote:
In my application I might be generating a very large number of log events. Most times I don't want to know what's in the blob, but for a small percentage of these messages I may decide that I want to convert the blob into a string (or use some viewer to display what is in the blob). So while I may end up converting it to a human readable string I can delay that until I know I want to look at the event.
As for binary properties I could see that would make writing filters more efficnet, instead of doing a ton of string compares I can compare primitive data types.
What do you think? Am I approaching this wrong?
Ceki G�lc� wrote:
