genofire/hs_monolith
genofire
/
hs_monolith
Archived
1
0
Fork 0

[BUGFIX] timestamp to log

This commit is contained in:
Geno 2017-03-30 15:04:04 +02:00 committed by GitHub
parent c79a52ef87
commit f77bf008e9
2 changed files with 5 additions and 2 deletions

View File

@ -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")

View File

@ -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