fork download
  1. #include <stdio.h>
  2.  
  3. #define ERROR 10
  4. #define MAIN "Main:"
  5.  
  6. #define LOG(lvl,mod,fmt,...) \
  7.   char msg[256] = {0}; \
  8.   snprintf(msg, 256, "%s: %d: "fmt,mod,lvl,##__VA_ARGS__)
  9.  
  10. int main()
  11. {
  12. LOG(ERROR, MAIN, "This is a log statement %d.\n", 0);
  13. return 0;
  14. }
Success #stdin #stdout 0s 9296KB
stdin
Standard input is empty
stdout
Standard output is empty