From d34e92ee7058d83016984d632272aa8702903aae Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Thu, 5 Nov 2015 17:14:47 -0700 Subject: [PATCH] checkDirectives must've slipped through the cracks in big merge Also we're not messing with log flags anymore during parsing. Timestamps could come in handy, plus concurrent logging is going on now. --- caddy/config.go | 7 ------- caddy/parse/parse.go | 1 + 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/caddy/config.go b/caddy/config.go index 4f33afb5..d7087bfe 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 ef33892b..1f9137d9 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 }