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:
parent
5216ab6b58
commit
2dd8a687b3
19 changed files with 82 additions and 34 deletions
|
@ -2,6 +2,7 @@ package chaos
|
|||
|
||||
import (
|
||||
"github.com/miekg/coredns/core/dnsserver"
|
||||
"github.com/miekg/coredns/middleware"
|
||||
|
||||
"github.com/mholt/caddy"
|
||||
)
|
||||
|
@ -16,7 +17,7 @@ func init() {
|
|||
func setup(c *caddy.Controller) error {
|
||||
version, authors, err := chaosParse(c)
|
||||
if err != nil {
|
||||
return err
|
||||
return middleware.Error("chaos", err)
|
||||
}
|
||||
|
||||
dnsserver.GetConfig(c).AddMiddleware(func(next dnsserver.Handler) dnsserver.Handler {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue