Index: Reduce log level when extracting metadata fails

This commit is contained in:
Michael Mayer 2021-02-15 21:05:00 +01:00
parent 5c3ca4ea5d
commit d9b204a268
2 changed files with 5 additions and 5 deletions

View file

@ -36,7 +36,7 @@ func ImportWorker(jobs <-chan ImportJob) {
if related.Main.NeedsExifToolJson() {
if jsonName, err := imp.convert.ToJson(related.Main); err != nil {
log.Errorf("import: %s in %s (extract metadata)", txt.Quote(err.Error()), txt.Quote(related.Main.BaseName()))
log.Debugf("import: %s in %s (extract metadata)", txt.Quote(err.Error()), txt.Quote(related.Main.BaseName()))
} else if err := related.Main.ReadExifToolJson(); err != nil {
log.Errorf("import: %s in %s (read metadata)", txt.Quote(err.Error()), txt.Quote(related.Main.BaseName()))
} else {
@ -138,7 +138,7 @@ func ImportWorker(jobs <-chan ImportJob) {
if f.NeedsExifToolJson() {
if jsonName, err := imp.convert.ToJson(f); err != nil {
log.Errorf("import: %s in %s (extract json metadata)", err.Error(), txt.Quote(f.BaseName()))
log.Debugf("import: %s in %s (extract metadata)", txt.Quote(err.Error()), txt.Quote(f.BaseName()))
} else {
log.Debugf("import: %s created", filepath.Base(jsonName))
}
@ -200,7 +200,7 @@ func ImportWorker(jobs <-chan ImportJob) {
if f.NeedsExifToolJson() {
if jsonName, err := imp.convert.ToJson(f); err != nil {
log.Errorf("import: %s in %s (extract json metadata)", err.Error(), txt.Quote(f.BaseName()))
log.Debugf("import: %s in %s (extract metadata)", txt.Quote(err.Error()), txt.Quote(f.BaseName()))
} else {
log.Debugf("import: %s created", filepath.Base(jsonName))
}

View file

@ -49,7 +49,7 @@ func IndexMain(related *RelatedFiles, ind *Index, opt IndexOptions) (result Inde
if f.NeedsExifToolJson() {
if jsonName, err := ind.convert.ToJson(f); err != nil {
log.Errorf("index: %s in %s (extract json metadata)", err.Error(), txt.Quote(f.BaseName()))
log.Debugf("index: %s in %s (extract metadata)", txt.Quote(err.Error()), txt.Quote(f.BaseName()))
} else {
log.Debugf("index: %s created", filepath.Base(jsonName))
}
@ -130,7 +130,7 @@ func IndexRelated(related RelatedFiles, ind *Index, opt IndexOptions) (result In
if f.NeedsExifToolJson() {
if jsonName, err := ind.convert.ToJson(f); err != nil {
log.Errorf("index: %s in %s (extract json metadata)", err.Error(), txt.Quote(f.BaseName()))
log.Debugf("index: %s in %s (extract metadata)", txt.Quote(err.Error()), txt.Quote(f.BaseName()))
} else {
log.Debugf("index: %s created", filepath.Base(jsonName))
}