aboutsummaryrefslogtreecommitdiffstats
path: root/include/log.h
diff options
context:
space:
mode:
authorLibravatar S. Christoffer Eliesen <christoffer@eliesen.no>2015-10-26 13:41:45 +0100
committerLibravatar S. Christoffer Eliesen <christoffer@eliesen.no>2015-10-27 14:37:44 +0100
commit9f02b0bf16972dfb7a18610e5096d4576e447a48 (patch)
treeb128d385d9c1889a9ad8e57751e3aab66c2994dc /include/log.h
parentMerge pull request #204 from sce/misc_stuff (diff)
downloadsway-9f02b0bf16972dfb7a18610e5096d4576e447a48.tar.gz
sway-9f02b0bf16972dfb7a18610e5096d4576e447a48.tar.zst
sway-9f02b0bf16972dfb7a18610e5096d4576e447a48.zip
commands: Learn 'debuglog'.
Replicates i3 option. Verbosity level given as command line argument becomes default log level, and using 'debuglog toggle' switches back and forth between default and debug (or L_ERROR and debug if default is also L_DEBUG).
Diffstat (limited to 'include/log.h')
-rw-r--r--include/log.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/log.h b/include/log.h
index 806725a6..4b769c93 100644
--- a/include/log.h
+++ b/include/log.h
@@ -11,6 +11,10 @@ typedef enum {
11} log_importance_t; 11} log_importance_t;
12 12
13void init_log(log_importance_t verbosity); 13void init_log(log_importance_t verbosity);
14void set_log_level(log_importance_t verbosity);
15void reset_log_level(void);
16// returns whether debug logging is on after switching.
17bool toggle_debug_logging(void);
14void sway_log_colors(int mode); 18void sway_log_colors(int mode);
15void sway_log(log_importance_t verbosity, const char* format, ...) __attribute__((format(printf,2,3))); 19void sway_log(log_importance_t verbosity, const char* format, ...) __attribute__((format(printf,2,3)));
16void sway_log_errno(log_importance_t verbosity, char* format, ...) __attribute__((format(printf,2,3))); 20void sway_log_errno(log_importance_t verbosity, char* format, ...) __attribute__((format(printf,2,3)));