log.c: New log_is_debug() function, hide access to debug variable

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2017-07-02 12:40:50 +02:00
1 parent e9d5512e1a
commit 51e1a907e6
6 files changed
+18 -11

No files matched your search

+6
View File
@@ -30,6 +30,7 @@
#include "finit.h"
#include "log.h"
static int debug = 0;
static int loglevel = LOG_NOTICE;
void log_init(int qit, int dbg)
@@ -63,6 +64,11 @@ void log_debug(void)
logit(LOG_NOTICE, "Debug mode %s", debug ? "enabled" : "disabled");
}
int log_is_debug(void)
{
return debug;
}
static void early_logit(int prio, const char *fmt, va_list ap)
{
FILE *fp;