Add flag to disable timestamps

This commit is contained in:
Julian Kornberger 2017-01-30 09:06:21 +01:00
parent fd6a169b18
commit 2e9f6fa459

View File

@ -24,9 +24,16 @@ var (
func main() { func main() {
var importPath string var importPath string
var timestamps bool
flag.StringVar(&importPath, "import", "", "import global statistics from the given RRD file, requires influxdb") 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.StringVar(&configFile, "config", "config.toml", "path of configuration file (default:config.yaml)")
flag.BoolVar(&timestamps, "timestamps", true, "print timestamps in output")
flag.Parse() flag.Parse()
if !timestamps {
log.SetFlags(0)
}
config = models.ReadConfigFile(configFile) config = models.ReadConfigFile(configFile)
if config.Influxdb.Enable { if config.Influxdb.Enable {