Logs: Always put time in brackets

This commit is contained in:
Michael Mayer
2021-10-02 15:19:11 +02:00
parent 9a88d7fc6a
commit de737a6eef
10 changed files with 14 additions and 14 deletions

View File

@@ -530,6 +530,6 @@ func DownloadAlbum(router *gin.RouterGroup) {
} }
} }
log.Infof("download: created %s in %s", txt.Quote(zipFileName), time.Since(start)) log.Infof("download: created %s [%s]", txt.Quote(zipFileName), time.Since(start))
}) })
} }

View File

@@ -126,7 +126,7 @@ func CreateZip(router *gin.RouterGroup) {
elapsed := int(time.Since(start).Seconds()) elapsed := int(time.Since(start).Seconds())
log.Infof("download: created %s in %s", txt.Quote(zipBaseName), time.Since(start)) log.Infof("download: created %s [%s]", txt.Quote(zipBaseName), time.Since(start))
c.JSON(http.StatusOK, gin.H{"code": http.StatusOK, "message": i18n.Msg(i18n.MsgZipCreatedIn, elapsed), "filename": zipBaseName}) c.JSON(http.StatusOK, gin.H{"code": http.StatusOK, "message": i18n.Msg(i18n.MsgZipCreatedIn, elapsed), "filename": zipBaseName})
}) })

View File

@@ -35,7 +35,7 @@ func main() {
fileName := "rules.yml" fileName := "rules.yml"
if !fs.FileExists(fileName) { if !fs.FileExists(fileName) {
log.Panicf("classify: label rules not found in %s", txt.Quote(filepath.Base(fileName))) log.Panicf("classify: found no label rules in %s", txt.Quote(filepath.Base(fileName)))
} }
yamlConfig, err := ioutil.ReadFile(fileName) yamlConfig, err := ioutil.ReadFile(fileName)

View File

@@ -186,7 +186,7 @@ func backupAction(ctx *cli.Context) error {
elapsed := time.Since(start) elapsed := time.Since(start)
log.Infof("backup completed in %s", elapsed) log.Infof("backup completed [%s]", elapsed)
conf.Shutdown() conf.Shutdown()

View File

@@ -58,7 +58,7 @@ func convertAction(ctx *cli.Context) error {
elapsed := time.Since(start) elapsed := time.Since(start)
log.Infof("converting completed in %s", elapsed) log.Infof("converting completed [%s]", elapsed)
return nil return nil
} }

View File

@@ -71,7 +71,7 @@ func copyAction(ctx *cli.Context) error {
elapsed := time.Since(start) elapsed := time.Since(start)
log.Infof("import completed in %s", elapsed) log.Infof("import completed [%s]", elapsed)
conf.Shutdown() conf.Shutdown()
return nil return nil
} }

View File

@@ -99,7 +99,7 @@ func facesStatsAction(ctx *cli.Context) error {
} else { } else {
elapsed := time.Since(start) elapsed := time.Since(start)
log.Infof("completed in %s", elapsed) log.Infof("completed [%s]", elapsed)
} }
conf.Shutdown() conf.Shutdown()
@@ -130,7 +130,7 @@ func facesAuditAction(ctx *cli.Context) error {
} else { } else {
elapsed := time.Since(start) elapsed := time.Since(start)
log.Infof("completed in %s", elapsed) log.Infof("completed [%s]", elapsed)
} }
conf.Shutdown() conf.Shutdown()
@@ -174,7 +174,7 @@ func facesResetAction(ctx *cli.Context) error {
} else { } else {
elapsed := time.Since(start) elapsed := time.Since(start)
log.Infof("completed in %s", elapsed) log.Infof("completed [%s]", elapsed)
} }
conf.Shutdown() conf.Shutdown()
@@ -212,7 +212,7 @@ func facesResetAllAction(ctx *cli.Context) error {
} else { } else {
elapsed := time.Since(start) elapsed := time.Since(start)
log.Infof("completed in %s", elapsed) log.Infof("completed [%s]", elapsed)
} }
conf.Shutdown() conf.Shutdown()
@@ -312,7 +312,7 @@ func facesUpdateAction(ctx *cli.Context) error {
} else { } else {
elapsed := time.Since(start) elapsed := time.Since(start)
log.Infof("completed in %s", elapsed) log.Infof("completed [%s]", elapsed)
} }
conf.Shutdown() conf.Shutdown()

View File

@@ -71,7 +71,7 @@ func importAction(ctx *cli.Context) error {
elapsed := time.Since(start) elapsed := time.Since(start)
log.Infof("import completed in %s", elapsed) log.Infof("import completed [%s]", elapsed)
conf.Shutdown() conf.Shutdown()
return nil return nil
} }

View File

@@ -44,7 +44,7 @@ func momentsAction(ctx *cli.Context) error {
} else { } else {
elapsed := time.Since(start) elapsed := time.Since(start)
log.Infof("completed in %s", elapsed) log.Infof("completed [%s]", elapsed)
} }
conf.Shutdown() conf.Shutdown()

View File

@@ -45,7 +45,7 @@ func optimizeAction(ctx *cli.Context) error {
} else { } else {
elapsed := time.Since(start) elapsed := time.Since(start)
log.Infof("completed in %s", elapsed) log.Infof("completed [%s]", elapsed)
} }
conf.Shutdown() conf.Shutdown()