mirror of
https://github.com/coredns/coredns.git
synced 2025-08-11 16:57:01 +02:00
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: Miek Gieben <miek@miek.nl>
This commit is contained in:
parent
7be2226eab
commit
cd5dcebe93
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user