Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please log upstreams on start #200

Open
timkgh opened this issue Jan 16, 2022 · 5 comments
Open

Please log upstreams on start #200

timkgh opened this issue Jan 16, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@timkgh
Copy link

timkgh commented Jan 16, 2022

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.

@gspannu
Copy link

gspannu commented Feb 21, 2022

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

@schzhn
Copy link
Member

schzhn commented Jan 31, 2024

@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

@ainar-g
Copy link
Contributor

ainar-g commented Jan 31, 2024

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

@ainar-g ainar-g added the enhancement New feature or request label Jan 31, 2024
@iJorgen
Copy link

iJorgen commented Jan 31, 2024

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".

log.Debug("dnsproxy: upstream at index %d: %s", idx, addr)

@timkgh
Copy link
Author

timkgh commented Jan 31, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants