mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-23 22:27:38 -05:00
Turn off log timestamp for parse errors (easier to read)
This commit is contained in:
parent
c7af6725ca
commit
7d96cfa424
1 changed files with 8 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
|||
package config
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net"
|
||||
"os"
|
||||
|
||||
|
@ -77,6 +78,10 @@ func Load(filename string) ([]Config, error) {
|
|||
}
|
||||
defer file.Close()
|
||||
|
||||
// turn off timestamp for parsing
|
||||
flags := log.Flags()
|
||||
log.SetFlags(0)
|
||||
|
||||
p, err := newParser(file)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@ -91,6 +96,9 @@ func Load(filename string) ([]Config, error) {
|
|||
cfgs[i].ConfigFile = filename
|
||||
}
|
||||
|
||||
// restore logging settings
|
||||
log.SetFlags(flags)
|
||||
|
||||
return cfgs, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue