fork of Sam Grove's library
Fork of LogUtil by
Revision 5:1b4f4d4aec8c, committed 2013-04-26
- Comitter:
- sam_grove
- Date:
- Fri Apr 26 06:28:00 2013 +0000
- Parent:
- 3:9f20058284bd
- Child:
- 6:163b9d47fa87
- Commit message:
- fflush() all streams when used. pointer to the same stream (maybe repetitive calls too) mix up the output;
Changed in this revision
LogUtil.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/LogUtil.h Wed Apr 10 06:18:50 2013 +0000 +++ b/LogUtil.h Fri Apr 26 06:28:00 2013 +0000 @@ -29,10 +29,12 @@ #define STREAM stdout #define LOG(...) \ fprintf(STREAM, "LOG: %s L#%d ", __PRETTY_FUNCTION__, __LINE__); \ - fprintf(STREAM, ##__VA_ARGS__) + fprintf(STREAM, ##__VA_ARGS__); \ + fflush(STREAM) #define WARN(...) \ fprintf(STREAM, "WARN: %s L#%d ", __PRETTY_FUNCTION__, __LINE__); \ - fprintf(STREAM, ##__VA_ARGS__) + fprintf(STREAM, ##__VA_ARGS__); \ + fflush(STREAM) #define ERROR(...) \ fprintf(STREAM, "ERROR: %s L#%d ", __PRETTY_FUNCTION__, __LINE__); \ fprintf(STREAM, ##__VA_ARGS__); \