aboutsummaryrefslogtreecommitdiff
path: root/include/common/log.h
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-04-25 15:06:58 -0400
committerDrew DeVault <sir@cmpwn.com>2017-04-25 15:06:58 -0400
commitde01e654cef2c72dce3adb580e20fe2cbc8aeb16 (patch)
tree11dbed7b9a15b1f0bb43320243c74e780e791c99 /include/common/log.h
parent52e6ed54cbaf05cd1829099e04427d1706ca0da4 (diff)
Flesh out wayland backend somewhat, add example
Diffstat (limited to 'include/common/log.h')
-rw-r--r--include/common/log.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/common/log.h b/include/common/log.h
new file mode 100644
index 00000000..849f8ef0
--- /dev/null
+++ b/include/common/log.h
@@ -0,0 +1,18 @@
+#ifndef _WLR_INTERNAL_COMMON_LOG_H
+#define _WLR_INTERNAL_COMMON_LOG_H
+#include <stdbool.h>
+#include <wlr/common/log.h>
+
+void wlr_log_errno(log_importance_t verbosity, char* format, ...) __attribute__((format(printf,2,3)));
+
+void wlr_log_errno(log_importance_t verbosity, char* format, ...) __attribute__((format(printf,2,3)));
+
+void _wlr_log(const char *filename, int line, log_importance_t verbosity, const char* format, ...) __attribute__((format(printf,4,5)));
+
+#define wlr_log(VERBOSITY, FMT, ...) \
+ _wlr_log(__FILE__, __LINE__, VERBOSITY, FMT, ##__VA_ARGS__)
+
+#define wlr_vlog(VERBOSITY, FMT, VA_ARGS) \
+ _wlr_vlog(__FILE__, __LINE__, VERBOSITY, FMT, VA_ARGS)
+
+#endif