mirror of
https://github.com/troglobit/finit.git
synced 2026-10-14 10:19:36 +00:00
log.c: New functions to hide access to quiet and silent flags
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
60df2f2ea9
commit
cd947a69a8
6 files changed
+24
-13
No files matched your search
@@ -31,6 +31,8 @@
|
||||
#include "log.h"
|
||||
|
||||
static int debug = 0;
|
||||
static int quiet = QUIET_MODE; /* Delayed disable of silent mode. */
|
||||
static int silent = SILENT_MODE; /* Completely silent, including boot */
|
||||
static int loglevel = LOG_NOTICE;
|
||||
|
||||
void log_init(int qit, int dbg)
|
||||
@@ -53,6 +55,19 @@ void log_exit(void)
|
||||
}
|
||||
}
|
||||
|
||||
void log_silent(void)
|
||||
{
|
||||
if (quiet && !debug)
|
||||
silent = 1;
|
||||
else
|
||||
silent = 0;
|
||||
}
|
||||
|
||||
int log_is_silent(void)
|
||||
{
|
||||
return silent;
|
||||
}
|
||||
|
||||
void log_debug(void)
|
||||
{
|
||||
debug = !debug;
|
||||
|
||||
Reference in new issue
Block a user