mirror of
https://github.com/coredns/coredns.git
synced 2025-12-09 11:55:13 -05:00
Fix error reporting (#128)
Put error back in the correct place in the directives.go. Also don't make it a pointer. If it *is* a pointer the buildstack function does not correctly set the Next Handler. Don't understand *why* this is different from Caddy. Anyway this fixes it, with the caveat that the error log file is now openend earlier in the startup. Fixes #127
This commit is contained in:
@@ -53,7 +53,9 @@ var directiveOrder = []directive{
|
||||
|
||||
// Directives that inject handlers (middleware)
|
||||
{"prometheus", setup.Prometheus},
|
||||
{"errors", setup.Errors},
|
||||
{"log", setup.Log},
|
||||
|
||||
{"chaos", setup.Chaos},
|
||||
{"rewrite", setup.Rewrite},
|
||||
{"loadbalance", setup.Loadbalance},
|
||||
@@ -62,7 +64,6 @@ var directiveOrder = []directive{
|
||||
{"secondary", setup.Secondary},
|
||||
{"etcd", setup.Etcd},
|
||||
{"proxy", setup.Proxy},
|
||||
{"errors", setup.Errors},
|
||||
}
|
||||
|
||||
// RegisterDirective adds the given directive to caddy's list of directives.
|
||||
@@ -90,5 +91,5 @@ type directive struct {
|
||||
|
||||
// SetupFunc takes a controller and may optionally return a middleware.
|
||||
// If the resulting middleware is not nil, it will be chained into
|
||||
// the HTTP handlers in the order specified in this package.
|
||||
// the DNS handlers in the order specified in this package.
|
||||
type SetupFunc func(c *setup.Controller) (middleware.Middleware, error)
|
||||
|
||||
Reference in New Issue
Block a user