mirror of
				https://github.com/photoprism/photoprism.git
				synced 2025-10-31 20:22:55 +08:00 
			
		
		
		
	Logs: Always put time in brackets
This commit is contained in:
		| @@ -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)) | ||||||
| 	}) | 	}) | ||||||
| } | } | ||||||
|   | |||||||
| @@ -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}) | ||||||
| 	}) | 	}) | ||||||
|   | |||||||
| @@ -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) | ||||||
|   | |||||||
| @@ -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() | ||||||
|  |  | ||||||
|   | |||||||
| @@ -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 | ||||||
| } | } | ||||||
|   | |||||||
| @@ -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 | ||||||
| } | } | ||||||
|   | |||||||
| @@ -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() | ||||||
|   | |||||||
| @@ -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 | ||||||
| } | } | ||||||
|   | |||||||
| @@ -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() | ||||||
|   | |||||||
| @@ -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() | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Michael Mayer
					Michael Mayer