Skip to content

Instantly share code, notes, and snippets.

@thiagomg
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thiagomg/13f49494c09f0989de71 to your computer and use it in GitHub Desktop.
Save thiagomg/13f49494c09f0989de71 to your computer and use it in GitHub Desktop.
void log_print(const std::string &str) { /* ... */ }
bool isInfoEnabled() { /* ... */ }
#define LOG_INFO(fmt, x) { \
if(isInfoEnabled()) log_print(boost::str( boost::format(fmt) % x) ); \
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment