diff --git a/caddy/config.go b/caddy/config.go index 4f33afb53..d7087bfef 100644 --- a/caddy/config.go +++ b/caddy/config.go @@ -29,10 +29,6 @@ const ( func loadConfigs(filename string, input io.Reader) ([]server.Config, error) { var configs []server.Config - // turn off timestamp for parsing - flags := log.Flags() - log.SetFlags(0) - // Each server block represents similar hosts/addresses, since they // were grouped together in the Caddyfile. serverBlocks, err := parse.ServerBlocks(filename, input, true) @@ -168,9 +164,6 @@ func loadConfigs(filename string, input io.Reader) ([]server.Config, error) { } } - // restore logging settings - log.SetFlags(flags) - return configs, nil } diff --git a/caddy/parse/parse.go b/caddy/parse/parse.go index ef33892b3..1f9137d9b 100644 --- a/caddy/parse/parse.go +++ b/caddy/parse/parse.go @@ -10,6 +10,7 @@ import "io" // in the order in which they appear. func ServerBlocks(filename string, input io.Reader, checkDirectives bool) ([]serverBlock, error) { p := parser{Dispenser: NewDispenser(filename, input)} + p.checkDirectives = checkDirectives blocks, err := p.parseAll() return blocks, err }