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.
This commit is contained in:
Matthew Holt 2015-11-05 17:14:47 -07:00
parent bcea5182c6
commit d34e92ee70
2 changed files with 1 additions and 7 deletions

View File

@ -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
}

View File

@ -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
}