mirror of
https://github.com/troglobit/finit.git
synced 2026-10-20 11:19:35 +00:00
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:
1 parent
e9d5512e1a
commit
51e1a907e6
6 files changed
+18
-11
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user