Commit cd5dcebe authored by Miek Gieben's avatar Miek Gieben Committed by GitHub

core: log panics (#3072)

These are too hidden now. They increase the issue-load, because people
don't see them.

Add log.Errorf in the core/dnsserver recover routine.
Signed-off-by: default avatarMiek Gieben <miek@miek.nl>
parent 7be2226e
......@@ -200,6 +200,7 @@ func (s *Server) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg)
// In case the user doesn't enable error plugin, we still
// need to make sure that we stay alive up here
if rec := recover(); rec != nil {
log.Errorf("Recovered from panic in server: %q", s.Addr)
vars.Panic.Inc()
errorAndMetricsFunc(s.Addr, w, r, dns.RcodeServerFailure)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment