From 2e9f6fa4595d1c2797fd764469e3d9f2263197f3 Mon Sep 17 00:00:00 2001 From: Julian Kornberger Date: Mon, 30 Jan 2017 09:06:21 +0100 Subject: [PATCH] Add flag to disable timestamps --- cmd/respond-collector/main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/respond-collector/main.go b/cmd/respond-collector/main.go index 4ed16ad..d40d073 100644 --- a/cmd/respond-collector/main.go +++ b/cmd/respond-collector/main.go @@ -24,9 +24,16 @@ var ( func main() { var importPath string + var timestamps bool flag.StringVar(&importPath, "import", "", "import global statistics from the given RRD file, requires influxdb") flag.StringVar(&configFile, "config", "config.toml", "path of configuration file (default:config.yaml)") + flag.BoolVar(×tamps, "timestamps", true, "print timestamps in output") flag.Parse() + + if !timestamps { + log.SetFlags(0) + } + config = models.ReadConfigFile(configFile) if config.Influxdb.Enable {