aboutsummaryrefslogtreecommitdiff
path: root/include/log.h
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2015-08-26 11:01:26 -0700
committerFurkan Sahin <furkan-dev@proton.me>2015-08-26 11:01:26 -0700
commit23b33ac2180214f831d6a7e62519ee9bca2a81e4 (patch)
tree067204ac10ae5f727c9bed71de9ad007aa80e023 /include/log.h
parent1911de40ecf48ca556eea6e6e263b7d166497983 (diff)
move_container_to fixup
Diffstat (limited to 'include/log.h')
-rw-r--r--include/log.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/log.h b/include/log.h
index 945ad239..f8deaf26 100644
--- a/include/log.h
+++ b/include/log.h
@@ -15,7 +15,11 @@ void sway_log_colors(int mode);
void sway_log(log_importance_t verbosity, const char* format, ...) __attribute__((format(printf,2,3)));
void sway_log_errno(log_importance_t verbosity, char* format, ...) __attribute__((format(printf,2,3)));
void sway_abort(const char* format, ...) __attribute__((format(printf,1,2)));
-bool sway_assert(bool condition, const char* format, ...) __attribute__((format(printf,2,3)));
+
+bool _sway_assert(bool condition, const char* format, ...) __attribute__((format(printf,2,3)));
+#define sway_assert(COND, FMT, ...) \
+ _sway_assert(COND, "%s:" FMT, __PRETTY_FUNCTION__, ##__VA_ARGS__)
+
void error_handler(int sig);
void layout_log(const swayc_t *c, int depth);