X-Git-Url: https://git.wpitchoune.net/gitweb/?a=blobdiff_plain;f=src%2Flog.h;h=c4931e573b15d7479c9669ba1ba7b1f03f591340;hb=64d52e239f715717646357783d01ff8650dbdb2d;hp=15be241342d19ffc7d5e07ff9f439690582c406f;hpb=f5947fd0047b6ef7a0f4045213dccba37124cc8f;p=ptask.git diff --git a/src/log.h b/src/log.h index 15be241..c4931e5 100644 --- a/src/log.h +++ b/src/log.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2013 jeanfi@gmail.com + * Copyright (C) 2010-2016 jeanfi@gmail.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -35,10 +35,11 @@ void log_err(const char *fmt, ...); void log_info(const char *fmt, ...); void log_warn(const char *fmt, ...); -void log_fct(const char *fct,const char *fmt, ...); +void _log(const char *fct, const char *fmt, ...); -#define log_fct_enter() log_fct(__func__, "ENTER"); -#define log_fct_exit() log_fct(__func__, "EXIT"); +#define log_fct(...) _log(__func__, __VA_ARGS__) +#define log_fct_enter() log_fct("ENTER") +#define log_fct_exit() log_fct("EXIT") /* level of the log file. */ extern int log_level;