aboutsummaryrefslogtreecommitdiffstats
path: root/include/log.h
diff options
context:
space:
mode:
authorLibravatar Dominique Martinet <asmadeus@codewreck.org>2018-01-05 22:32:51 +0100
committerLibravatar Dominique Martinet <asmadeus@codewreck.org>2018-01-05 23:39:46 +0100
commit67985e903188a464e602d04f9ed218bd397f5ab1 (patch)
tree3589175749c9a2ed746b0cc280ab3ccfb33125e9 /include/log.h
parentMerge pull request #1554 from martinetd/cmd_set (diff)
downloadsway-67985e903188a464e602d04f9ed218bd397f5ab1.tar.gz
sway-67985e903188a464e602d04f9ed218bd397f5ab1.tar.zst
sway-67985e903188a464e602d04f9ed218bd397f5ab1.zip
sway: change all sway_log to wlr_log
Diffstat (limited to 'include/log.h')
-rw-r--r--include/log.h25
1 files changed, 1 insertions, 24 deletions
diff --git a/include/log.h b/include/log.h
index a1e33fa2..646776f5 100644
--- a/include/log.h
+++ b/include/log.h
@@ -1,22 +1,7 @@
1#ifndef _SWAY_LOG_H 1#ifndef _SWAY_LOG_H
2#define _SWAY_LOG_H 2#define _SWAY_LOG_H
3#include <stdbool.h> 3#include <stdbool.h>
4 4#include <wlr/util/log.h>
5typedef enum {
6 L_SILENT = 0,
7 L_ERROR = 1,
8 L_INFO = 2,
9 L_DEBUG = 3,
10} log_importance_t;
11
12void init_log(log_importance_t verbosity);
13void set_log_level(log_importance_t verbosity);
14log_importance_t get_log_level(void);
15void reset_log_level(void);
16// returns whether debug logging is on after switching.
17bool toggle_debug_logging(void);
18void sway_log_colors(int mode);
19void sway_log_errno(log_importance_t verbosity, char* format, ...) __attribute__((format(printf,2,3)));
20 5
21void _sway_abort(const char *filename, int line, const char* format, ...) __attribute__((format(printf,3,4))); 6void _sway_abort(const char *filename, int line, const char* format, ...) __attribute__((format(printf,3,4)));
22#define sway_abort(FMT, ...) \ 7#define sway_abort(FMT, ...) \
@@ -26,14 +11,6 @@ bool _sway_assert(bool condition, const char *filename, int line, const char* fo
26#define sway_assert(COND, FMT, ...) \ 11#define sway_assert(COND, FMT, ...) \
27 _sway_assert(COND, __FILE__, __LINE__, "%s:" FMT, __PRETTY_FUNCTION__, ##__VA_ARGS__) 12 _sway_assert(COND, __FILE__, __LINE__, "%s:" FMT, __PRETTY_FUNCTION__, ##__VA_ARGS__)
28 13
29void _sway_log(const char *filename, int line, log_importance_t verbosity, const char* format, ...) __attribute__((format(printf,4,5)));
30
31#define sway_log(VERBOSITY, FMT, ...) \
32 _sway_log(__FILE__, __LINE__, VERBOSITY, FMT, ##__VA_ARGS__)
33
34#define sway_vlog(VERBOSITY, FMT, VA_ARGS) \
35 _sway_vlog(__FILE__, __LINE__, VERBOSITY, FMT, VA_ARGS)
36
37void error_handler(int sig); 14void error_handler(int sig);
38 15
39#endif 16#endif