mirror of
https://github.com/coredns/coredns.git
synced 2025-10-30 09:43:17 -04:00
Startup notification (#250)
Stop the caddy message and start our own init notifications. Log the version of CoreDNS when starting up. Fix all middleware's setup functions so that return the error prefixed with *which* middleware was failing; leads to better debuggable errors when starting up.
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/miekg/coredns/core/dnsserver"
|
||||
"github.com/miekg/coredns/middleware"
|
||||
|
||||
"github.com/mholt/caddy"
|
||||
)
|
||||
@@ -19,7 +20,7 @@ func init() {
|
||||
func setup(c *caddy.Controller) error {
|
||||
rewrites, err := rewriteParse(c)
|
||||
if err != nil {
|
||||
return err
|
||||
return middleware.Error("rewrite", err)
|
||||
}
|
||||
|
||||
dnsserver.GetConfig(c).AddMiddleware(func(next dnsserver.Handler) dnsserver.Handler {
|
||||
|
||||
Reference in New Issue
Block a user