From 7d96cfa424be2ec249fff8ce3785b02cb7f41e4f Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Wed, 15 Apr 2015 23:17:56 -0600 Subject: [PATCH] Turn off log timestamp for parse errors (easier to read) --- config/config.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/config.go b/config/config.go index 0222b000..151f9b82 100644 --- a/config/config.go +++ b/config/config.go @@ -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 }