> We won't have a quorum to officially discuss logging > with the rest of the DM team Some quick thoughts: + This is a good start, thanks! + Free functions vs. a log object need to be discussed more. In particular, when metadata key/value pairs need to be attached, an object might make more sense. Avoiding the getLogger() call when no logging is needed (due to threshold) can be significant. + It's a security breach to use vsprintf() with any user-provided arguments. Use vsnprintf() instead so that you can check for overflow. (Or use stringstream or boost::format.) + In my prototype, I used a combination of a set of static log4cxx::LevelPtr variables with isEnabledFor(level) and a set of cpp macros to avoid the switch. + The return value from getLogger() shouldn't need to be cast. -- Kian-Tat Lim, LSST Data Management, [log in to unmask] ######################################################################## Use REPLY-ALL to reply to list To unsubscribe from the QSERV-L list, click the following link: https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=QSERV-L&A=1