aboutsummaryrefslogtreecommitdiffstats
path: root/common/log.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2016-06-27 20:05:11 -0400
committerLibravatar GitHub <noreply@github.com>2016-06-27 20:05:11 -0400
commitb5d778dd828f8a772373931adaf10152f7db5854 (patch)
treed576aeed92f5819b1e873539e6151509eeec529d /common/log.c
parentMerge pull request #723 from deklov/master (diff)
parentAdd get_log_level() to encapsulate v (current log level) (diff)
downloadsway-b5d778dd828f8a772373931adaf10152f7db5854.tar.gz
sway-b5d778dd828f8a772373931adaf10152f7db5854.tar.zst
sway-b5d778dd828f8a772373931adaf10152f7db5854.zip
Merge pull request #728 from deklov/master
Add get_log_level() to encapsulate v (current log level)
Diffstat (limited to 'common/log.c')
-rw-r--r--common/log.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/common/log.c b/common/log.c
index ef791bec..56c3834a 100644
--- a/common/log.c
+++ b/common/log.c
@@ -12,9 +12,9 @@
12#include <string.h> 12#include <string.h>
13#include <stringop.h> 13#include <stringop.h>
14 14
15int colored = 1; 15static int colored = 1;
16log_importance_t loglevel_default = L_ERROR; 16static log_importance_t loglevel_default = L_ERROR;
17log_importance_t v = L_SILENT; 17static log_importance_t v = L_SILENT;
18 18
19static const char *verbosity_colors[] = { 19static const char *verbosity_colors[] = {
20 [L_SILENT] = "", 20 [L_SILENT] = "",
@@ -38,6 +38,10 @@ void set_log_level(log_importance_t verbosity) {
38 v = verbosity; 38 v = verbosity;
39} 39}
40 40
41log_importance_t get_log_level(void) {
42 return v;
43}
44
41void reset_log_level(void) { 45void reset_log_level(void) {
42 v = loglevel_default; 46 v = loglevel_default;
43} 47}