X-Git-Url: http://pilppa.org/gitweb/?p=libplp.git;a=blobdiff_plain;f=src%2Flog.h;h=c88b6c8bc4dde2ce3f0ebdcd779a51c4a12b4cb9;hp=17596df25c93a206fd27da21f8063804d1267219;hb=6114bb5f252afb1e86682836b82db3e4c48213fe;hpb=91f1aed496d23e7b2fb4baccc33b2aa31a8e6877 diff --git a/src/log.h b/src/log.h index 17596df..c88b6c8 100644 --- a/src/log.h +++ b/src/log.h @@ -10,9 +10,9 @@ #include -#define log_debug(...) fprintf(stdout, __VA_ARGS__) -#define log_info(...) fprintf(stdout, __VA_ARGS__) -#define log_warning(...) fprintf(stderr, __VA_ARGS__) -#define log_error(...) fprintf(stderr, __VA_ARGS__) +#define log_debug(a, b...) fprintf(stdout, "[dbg] %s: " a, __FUNCTION__, ## b) +#define log_info(a, b...) fprintf(stdout, "[inf] %s: " a, __FUNCTION__, ## b) +#define log_warning(a, b...) fprintf(stderr, "[wrn] %s: " a, __FUNCTION__, ## b) +#define log_error(a, b...) fprintf(stderr, "[err] %s: " a, __FUNCTION__, ## b) #endif /* LOG_H_ */