--- embedaddon/strongswan/src/libcharon/daemon.c 2020/06/03 09:46:44 1.1.1.1 +++ embedaddon/strongswan/src/libcharon/daemon.c 2021/03/17 00:20:08 1.1.1.2 @@ -450,6 +450,7 @@ static void load_sys_logger(private_daemon_t *this, ch sys_logger_t *sys_logger; debug_t group; level_t def; + bool ike_name, log_level; if (get_syslog_facility(facility) == -1) { @@ -462,10 +463,13 @@ static void load_sys_logger(private_daemon_t *this, ch return; } - sys_logger->set_options(sys_logger, - lib->settings->get_bool(lib->settings, "%s.syslog.%s.ike_name", - FALSE, lib->ns, facility)); + ike_name = lib->settings->get_bool(lib->settings, "%s.syslog.%s.ike_name", + FALSE, lib->ns, facility); + log_level = lib->settings->get_bool(lib->settings, "%s.syslog.%s.log_level", + FALSE, lib->ns, facility); + sys_logger->set_options(sys_logger, ike_name, log_level); + def = lib->settings->get_int(lib->settings, "%s.syslog.%s.default", 1, lib->ns, facility); for (group = 0; group < DBG_MAX; group++) @@ -486,7 +490,7 @@ static void load_file_logger(private_daemon_t *this, c file_logger_t *file_logger; debug_t group; level_t def; - bool add_ms, ike_name, flush_line, append; + bool add_ms, ike_name, log_level, flush_line, append; char *time_format, *filename; time_format = lib->settings->get_str(lib->settings, @@ -495,6 +499,8 @@ static void load_file_logger(private_daemon_t *this, c "%s.filelog.%s.time_add_ms", FALSE, lib->ns, section); ike_name = lib->settings->get_bool(lib->settings, "%s.filelog.%s.ike_name", FALSE, lib->ns, section); + log_level = lib->settings->get_bool(lib->settings, + "%s.filelog.%s.log_level", FALSE, lib->ns, section); flush_line = lib->settings->get_bool(lib->settings, "%s.filelog.%s.flush_line", FALSE, lib->ns, section); append = lib->settings->get_bool(lib->settings, @@ -508,7 +514,8 @@ static void load_file_logger(private_daemon_t *this, c return; } - file_logger->set_options(file_logger, time_format, add_ms, ike_name); + file_logger->set_options(file_logger, time_format, add_ms, ike_name, + log_level); file_logger->open(file_logger, flush_line, append); def = lib->settings->get_int(lib->settings, "%s.filelog.%s.default", 1,