Skip to content

Commit

Permalink
add simplest logger log.h
Browse files Browse the repository at this point in the history
  • Loading branch information
Akagi201 committed Oct 8, 2014
1 parent 2452d5c commit 88035f7
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions log.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* @file log.h
* @auther Akagi201
*
* @date 2014/09/16
*/

#ifndef LOG_H_
#define LOG_H_ (1)

#ifdef NODEBUG
#define LOG(fmt, ...) do {} while (0)
#else
#define LOG(fmt, ...) fprintf(stdout, "[DEBUG] %s:%s:%d: " fmt "\n", __FILE__, __FUNCTION__, __LINE__, ##__VA_ARGS__)
#endif

#endif // LOG_H_

0 comments on commit 88035f7

Please sign in to comment.