acme-dns
acme-dns copied to clipboard
Feature Request: emit log message when acme-dns is actually ready
I'd like to hook acme-dns
into automated tests for a Python client, instead of mocking endpoints. To accomplish this, I need to know when acme-dns has successfully started.
I would love to see a log line such as
INFO[001] acme-dns is ready
I tried generating a PR, but this is much harder than expected. While the database appears to fail instantly when a problem is encountered, the following components seem to be spawned into async tasks that could fail/succeed at any point:
- HTTP Listen
- DNS Listen UDP/TCP
- Certificate Maintenance Routine
Because of this, as an example: If there is an issue in binding the DNS server to a port, the error message will appear after the "Listening" message
INFO[0000] Listening DNS addr="127.0.0.1:53" proto=tcp
INFO[0000] Listening HTTP host="0.0.0.0:8011"
INFO[0000] 2020/06/10 13:01:06 [INFO][cache:0xc0000a2690] Started certificate maintenance routine
INFO[0000] Listening DNS addr="127.0.0.1:53" proto=udp
FATA[0000] listen tcp 127.0.0.1:53: bind: permission denied
Having a log message appear when either of these two things happen would be very useful:
- every element is successfully bound to a port
- each element is bound to a port
Right now I have to just wait a few seconds after everything subsystem starts, then inspect the process to hope it is alive and there were no errors logged. This is brutal on my test times.