diff options
Diffstat (limited to 'main.h')
-rw-r--r-- | main.h | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -42,11 +42,12 @@ void __debug(enum debug_lvl lvl, const char *fmt, ...) __attribute__((format(pri #define __ifdebug(lvl, fmt, ...) \ do { \ if (debug_enabled((lvl))) \ - __debug((lvl), fmt __VA_OPT__(,) __VA_ARGS__); \ + __debug((lvl), fmt "\n"__VA_OPT__(,) __VA_ARGS__); \ } while (0) -#define debug(lvl, fmt, ...) __ifdebug((lvl), "%s:%i: " fmt, __func__, \ - __LINE__ __VA_OPT__(,) __VA_ARGS__) +#define debug(lvl, fmt, ...) __ifdebug((lvl), "%s:%s:%i: " fmt, \ + __func__, __FILE__, __LINE__ \ + __VA_OPT__(,) __VA_ARGS__) #define verbose(fmt, ...) __ifdebug(DBG_VERBOSE, fmt, __VA_ARGS__) #define info(fmt, ...) __ifdebug(DBG_INFO, fmt, __VA_ARGS__) #define error(fmt, ...) __ifdebug(DBG_ERROR, "%s: " fmt, \ @@ -56,8 +57,6 @@ void __die(const char *fmt, ...) __attribute__((format(printf, 1, 2))); #define die(fmt, ...) __die("%s:%i: " fmt "\n", __func__, \ __LINE__ __VA_OPT__(,) __VA_ARGS__) -#define perrordie(fmt, ...) __die("%s:%i: " fmt ": %m\n", __func__, \ - __LINE__ __VA_OPT__(,) __VA_ARGS__) struct uring_task; |