dnsproxy icon indicating copy to clipboard operation
dnsproxy copied to clipboard

Please log upstreams on start

Open timkgh opened this issue 3 years ago • 5 comments

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.

timkgh avatar Jan 16 '22 17:01 timkgh

Logging should include all config options, so that later debugging is useful.

gspannu avatar Feb 21 '22 09:02 gspannu

@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 avatar Jan 31 '24 11:01 schzhn

@schzhn, that output does not include the section, so this issue should remain open at least until we do that.

ainar-g avatar Jan 31 '24 11:01 ainar-g

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

iJorgen avatar Jan 31 '24 11:01 iJorgen

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.

timkgh avatar Jan 31 '24 17:01 timkgh