Skip to content

Instantly share code, notes, and snippets.

@yaotti
Created November 18, 2010 14:02
Show Gist options
  • Save yaotti/704998 to your computer and use it in GitHub Desktop.
Save yaotti/704998 to your computer and use it in GitHub Desktop.
#ifndef DEBUG_H
#define DEBUG_H
#if DEBUG
#define ILOG(...) fprintf(stderr, "\e[32m[I]\e[0m " __VA_ARGS__)
#define DLOG(...) fprintf(stderr, "\e[33m[D]\e[0m " __VA_ARGS__)
#define ELOG(...) fprintf(stderr, "\e[31m[E]\e[0m " __VA_ARGS__)
#define LINE fprintf(stderr, "\e[31m------------------------------\e[0m")
#else
#define ILOG(...)
#define DLOG(...)
#define ELOG(...)
#define LINE
#endif
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment