aboutsummaryrefslogtreecommitdiffstats
path: root/include/log.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/log.h')
-rw-r--r--include/log.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/log.h b/include/log.h
index 268783f4..efacf90f 100644
--- a/include/log.h
+++ b/include/log.h
@@ -22,14 +22,14 @@ bool _sway_assert(bool condition, const char* format, ...) __attribute__((format
22#define sway_assert(COND, FMT, ...) \ 22#define sway_assert(COND, FMT, ...) \
23 _sway_assert(COND, "%s:" FMT, __PRETTY_FUNCTION__, ##__VA_ARGS__) 23 _sway_assert(COND, "%s:" FMT, __PRETTY_FUNCTION__, ##__VA_ARGS__)
24 24
25#ifndef NDEBUG
26void _sway_log(const char *filename, int line, log_importance_t verbosity, const char* format, ...) __attribute__((format(printf,4,5))); 25void _sway_log(const char *filename, int line, log_importance_t verbosity, const char* format, ...) __attribute__((format(printf,4,5)));
26
27#ifndef NDEBUG
27#define sway_log(VERBOSITY, FMT, ...) \ 28#define sway_log(VERBOSITY, FMT, ...) \
28 _sway_log(__FILE__, __LINE__, VERBOSITY, FMT, ##__VA_ARGS__) 29 _sway_log(__FILE__, __LINE__, VERBOSITY, FMT, ##__VA_ARGS__)
29#else 30#else
30void _sway_log(log_importance_t verbosity, const char* format, ...) __attribute__((format(printf,2,3)));
31#define sway_log(VERBOSITY, FMT, ...) \ 31#define sway_log(VERBOSITY, FMT, ...) \
32 _sway_log(VERBOSITY, FMT, ##__VA_ARGS__) 32 _sway_log(NULL, 0, VERBOSITY, FMT, ##__VA_ARGS__)
33#endif 33#endif
34 34
35void error_handler(int sig); 35void error_handler(int sig);