mirror of
https://github.com/coredns/coredns.git
synced 2025-10-31 18:23:13 -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:
@@ -1,6 +1,10 @@
|
||||
package health
|
||||
|
||||
import "github.com/mholt/caddy"
|
||||
import (
|
||||
"github.com/miekg/coredns/middleware"
|
||||
|
||||
"github.com/mholt/caddy"
|
||||
)
|
||||
|
||||
func init() {
|
||||
caddy.RegisterPlugin("health", caddy.Plugin{
|
||||
@@ -12,7 +16,7 @@ func init() {
|
||||
func setup(c *caddy.Controller) error {
|
||||
addr, err := healthParse(c)
|
||||
if err != nil {
|
||||
return err
|
||||
return middleware.Error("health", err)
|
||||
}
|
||||
|
||||
health := &Health{Addr: addr}
|
||||
|
||||
Reference in New Issue
Block a user