Logs: Tweak messages and log levels for improved readability

This commit is contained in:
Michael Mayer
2021-10-02 14:24:44 +02:00
parent 8ebedf2f7d
commit 9a88d7fc6a
32 changed files with 123 additions and 116 deletions

View File

@@ -6,6 +6,8 @@ import (
"strings"
"time"
"github.com/dustin/go-humanize/english"
"github.com/urfave/cli"
"github.com/photoprism/photoprism/internal/config"
@@ -76,7 +78,7 @@ func purgeAction(ctx *cli.Context) error {
} else {
elapsed := time.Since(start)
log.Infof("purge: removed %d files and %d photos in %s", len(files), len(photos), elapsed)
log.Infof("purge: removed %s and %s [%s]", english.Plural(len(files), "file", "files"), english.Plural(len(photos), "photo", "photos"), elapsed)
}
conf.Shutdown()