Add flag to disable timestamps
This commit is contained in:
		
							parent
							
								
									fd6a169b18
								
							
						
					
					
						commit
						2e9f6fa459
					
				@ -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 {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user