log: map log level "SECURE" to GLib's "INFO"
Make "secure" a log level different from "default". "secure" should be right between "default" and "verbose". Map "default" to Glib's "MESSAGE" log level.
This commit is contained in:
parent
5c0c66d676
commit
bfaaf425c2
@ -33,12 +33,12 @@
|
|||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#define LOG_LEVEL_SECURE G_LOG_LEVEL_MESSAGE
|
#define LOG_LEVEL_SECURE G_LOG_LEVEL_INFO
|
||||||
|
|
||||||
#define LOG_DATE_BUF_SIZE 16
|
#define LOG_DATE_BUF_SIZE 16
|
||||||
#define LOG_DATE_LEN (LOG_DATE_BUF_SIZE - 1)
|
#define LOG_DATE_LEN (LOG_DATE_BUF_SIZE - 1)
|
||||||
|
|
||||||
static unsigned int log_threshold = G_LOG_LEVEL_INFO;
|
static unsigned int log_threshold = G_LOG_LEVEL_MESSAGE;
|
||||||
|
|
||||||
static const char *log_charset;
|
static const char *log_charset;
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ void initLog(bool verbose)
|
|||||||
if (!(param = getConfigParam(CONF_LOG_LEVEL)))
|
if (!(param = getConfigParam(CONF_LOG_LEVEL)))
|
||||||
return;
|
return;
|
||||||
if (0 == strcmp(param->value, "default")) {
|
if (0 == strcmp(param->value, "default")) {
|
||||||
log_threshold = G_LOG_LEVEL_INFO;
|
log_threshold = G_LOG_LEVEL_MESSAGE;
|
||||||
} else if (0 == strcmp(param->value, "secure")) {
|
} else if (0 == strcmp(param->value, "secure")) {
|
||||||
log_threshold = LOG_LEVEL_SECURE;
|
log_threshold = LOG_LEVEL_SECURE;
|
||||||
} else if (0 == strcmp(param->value, "verbose")) {
|
} else if (0 == strcmp(param->value, "verbose")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user