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
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue