Advertisement
Guest User

Untitled

a guest
Apr 16th, 2014
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. #define FiltedLog( ...)
  2. if (logDetail)
  3. MP_LOG(LOG_INFO, __VA_ARGS__);
  4.  
  5. #define MP_LOG(level,fmt,...)
  6. BOOAT::LOG("MP", level, fmt, ##__VA_ARGS__)
  7.  
  8. #define LOG(tag,level,fmt,...)
  9. Log::log(tag, level, "%s: " fmt, __PRETTY_FUNCTION__, ##__VA_ARGS__)
  10.  
  11. int main ()
  12. {
  13. FiltedLog ( "abc", 1, 2);
  14. }
  15.  
  16. #line 1 "test.cpp"
  17.  
  18. int main ()
  19. {
  20. if (logDetail) BOOAT::Log::log("MP", LOG_INFO, "%s: " "abc", 1, 2, __PRETTY_FUNCTION__ );;
  21. }
  22.  
  23. if (logDetail) BOOAT::Log::log("MP", LOG_INFO, "%s: " "abc", __PRETTY_FUNCTION__, 1, 2);;
  24.  
  25. #define INDIRECT_EXPAND(m, args) m args
  26.  
  27. #define FiltedLog( ...)
  28. if (logDetail)
  29. INDIRECT_EXPAND(MP_LOG, (LOG_INFO, __VA_ARGS__));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement