diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/log.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/log.h b/include/log.h index 60b3763b..32981b62 100644 --- a/include/log.h +++ b/include/log.h | |||
@@ -19,9 +19,9 @@ void sway_log_colors(int mode); | |||
19 | void sway_log_errno(log_importance_t verbosity, char* format, ...) __attribute__((format(printf,2,3))); | 19 | void sway_log_errno(log_importance_t verbosity, char* format, ...) __attribute__((format(printf,2,3))); |
20 | void sway_abort(const char* format, ...) __attribute__((format(printf,1,2))); | 20 | void sway_abort(const char* format, ...) __attribute__((format(printf,1,2))); |
21 | 21 | ||
22 | bool _sway_assert(bool condition, const char* format, ...) __attribute__((format(printf,2,3))); | 22 | bool _sway_assert(bool condition, const char *filename, int line, const char* format, ...) __attribute__((format(printf,4,5))); |
23 | #define sway_assert(COND, FMT, ...) \ | 23 | #define sway_assert(COND, FMT, ...) \ |
24 | _sway_assert(COND, "%s:" FMT, __PRETTY_FUNCTION__, ##__VA_ARGS__) | 24 | _sway_assert(COND, __FILE__, __LINE__, "%s:" FMT, __PRETTY_FUNCTION__, ##__VA_ARGS__) |
25 | 25 | ||
26 | void _sway_log(const char *filename, int line, log_importance_t verbosity, const char* format, ...) __attribute__((format(printf,4,5))); | 26 | void _sway_log(const char *filename, int line, log_importance_t verbosity, const char* format, ...) __attribute__((format(printf,4,5))); |
27 | 27 | ||