[BUGFIX] timestamp to log
This commit is contained in:
		
							parent
							
								
									c79a52ef87
								
							
						
					
					
						commit
						f77bf008e9
					
				|  | @ -29,7 +29,10 @@ func main() { | ||||||
| 	// load config
 | 	// load config
 | ||||||
| 	config = models.ReadConfigFile(configFile) | 	config = models.ReadConfigFile(configFile) | ||||||
| 
 | 
 | ||||||
| 	lib.LogTimestamp(timestamps) | 	if !timestamps { | ||||||
|  | 		log.SetFlags(0) | ||||||
|  | 		lib.LogTimestamp(false) | ||||||
|  | 	} | ||||||
| 
 | 
 | ||||||
| 	log.Println("Starting rezension monolith") | 	log.Println("Starting rezension monolith") | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -16,7 +16,7 @@ func init(){ | ||||||
| 
 | 
 | ||||||
| func LogTimestamp(value bool) { | func LogTimestamp(value bool) { | ||||||
| 	logger.SetFormatter(&logger.TextFormatter{ | 	logger.SetFormatter(&logger.TextFormatter{ | ||||||
| 		DisableTimestamp: value, | 		DisableTimestamp: !value, | ||||||
| 	}) | 	}) | ||||||
| } | } | ||||||
| // LogHTTP to add information of a httprequest to log
 | // LogHTTP to add information of a httprequest to log
 | ||||||
|  |  | ||||||
		Reference in New Issue
	
	 Geno
						Geno