dnsproxy
dnsproxy copied to clipboard
Please log upstreams on start
It currently logs the fallback, but it would be useful to log the upstreams also to make sure the config is correct:
2022/01/11 13:59:18 [info] Fallback 0 is https://1.1.1.2:443/dns-query
Similar lines should be logged for upstreams.
Maybe more useful config options should also be logged, in particular when reading from the yaml config file, i'm not confident all of them are interpreted correctly.
Logging should include all config options, so that later debugging is useful.
@timkgh, you can enable verbose log output by using the -v
flag.
./dnsproxy -v -l 127.0.0.1 -p 5353 -u 9.9.9.9 -u 2620:fe::fe -f 149.112.112.112 -f 2620:fe::9
[info] Starting dnsproxy 0
[debug] dnsproxy: upstream at index 0: 9.9.9.9:53
[debug] dnsproxy: upstream at index 1: [2620:fe::fe]:53
[debug] dnsproxy: upstream at index 0: 149.112.112.112:53
[debug] dnsproxy: upstream at index 1: [2620:fe::9]:53
@schzhn, that output does not include the section, so this issue should remain open at least until we do that.
It currently logs the fallback, but it would be useful to log the upstreams also to make sure the config is correct:
2022/01/11 13:59:18 [info] Fallback 0 is https://1.1.1.2:443/dns-query
Similar lines should be logged for upstreams.
You can fix this is you self-compile. Change this line from "log.Debug" to "log.Info". https://github.com/AdguardTeam/dnsproxy/blob/64814cc1ef71e45d6f0c8a45e38f9babe04d250e/proxy/upstreams.go#L266
you can enable verbose log output by using the -v flag
@schzhn I do not want to run with verbose logging all the time, just want to see useful config info at start.