aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorZandr Martin <zandrmartin@gmail.com>2016-07-02 08:14:40 -0500
committerZandr Martin <zandrmartin@gmail.com>2016-07-02 08:14:40 -0500
commit034410819d4c8ea28105c5a5eef0563635a36a9d (patch)
treef24f60afd5ee641bddc78e6b16a8035e3abf7469 /common
parentcbbeeb2cc3037d7538c7124e6ac0fe9e239731bb (diff)
parent7144fb9fc3b3d3b45d23deaab6a10caf3216cca4 (diff)
Merge remote-tracking branch 'upstream/master' into set-size-command
Diffstat (limited to 'common')
-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 @@
#include <string.h>
#include <stringop.h>
-int colored = 1;
-log_importance_t loglevel_default = L_ERROR;
-log_importance_t v = L_SILENT;
+static int colored = 1;
+static log_importance_t loglevel_default = L_ERROR;
+static log_importance_t v = L_SILENT;
static const char *verbosity_colors[] = {
[L_SILENT] = "",
@@ -38,6 +38,10 @@ void set_log_level(log_importance_t verbosity) {
v = verbosity;
}
+log_importance_t get_log_level(void) {
+ return v;
+}
+
void reset_log_level(void) {
v = loglevel_default;
}