dns_conf: add option to enable output log to console.

This commit is contained in:
Nick Peng
2023-03-13 23:20:03 +08:00
parent 3d7a2a8d80
commit 1c605938e0
5 changed files with 16 additions and 1 deletions

View File

@@ -441,7 +441,10 @@ static int _smartdns_init(void)
goto errout;
}
tlog_setlogscreen(verbose_screen);
if (verbose_screen != 0 || dns_conf_log_console != 0) {
tlog_setlogscreen(1);
}
tlog_setlevel(dns_conf_log_level);
if (dns_conf_log_file_mode > 0) {
tlog_set_permission(tlog_get_root(), dns_conf_log_file_mode, dns_conf_log_file_mode);