Using boost.log with printf-style macros
问题 I'm working on an application that uses an custom, platform-dependent logger. The application defines some printf-style macros: #define LOG_DEBUG(format, ...) \ logger.log(DEBUG, __FUNCTION__, format, ##__VA_ARGS__) ... The past few days I've been working on moving the application to use boost.log . The biggest problem I'm having is trying to retain this macro format so that only the logger internals need to be changed, since boost's logging API is implemented in iostream-style, i.e. BOOST