diff options
Diffstat (limited to 'common/eurephia_log.h')
-rw-r--r-- | common/eurephia_log.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/common/eurephia_log.h b/common/eurephia_log.h index cb83f61..07aaea3 100644 --- a/common/eurephia_log.h +++ b/common/eurephia_log.h @@ -41,7 +41,7 @@ * binary if debug logging is not enabled at compile time. This will always use the LOG_DEBUG target * when calling eurephia_log(). */ -#define DEBUG(ctx, log_level, log_string...) eurephia_log(ctx, LOG_DEBUG, log_level, ## log_string); +#define DEBUG(ctx, log_level, log_string...) _eurephia_log_func(ctx, LOG_DEBUG, log_level, __FILE__, __LINE__, ## log_string); #else #define DEBUG(ctx, lvl, rest...) {}; #endif @@ -56,6 +56,8 @@ int eurephia_log_init(eurephiaCTX *ctx, const char *dest, int loglvl); void eurephia_log_close(eurephiaCTX *ctx); -void eurephia_log(eurephiaCTX *ctx, int logdst, int loglvl, const char *fmt, ... ); +#define eurephia_log(ctx, dst, lvl, log_string...) _eurephia_log_func(ctx, dst, lvl, __FILE__, __LINE__, ## log_string) +void _eurephia_log_func(eurephiaCTX *ctx, int logdst, int loglvl, const char *file, int line, + const char *fmt, ... ); #endif /* !EUREPHIA_LOG_H_ */ |