Backend: Improve metadata logs
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
parent
abe9d16340
commit
4721f9d044
3 changed files with 6 additions and 6 deletions
|
@ -136,7 +136,7 @@ func SavePhotoForm(model Photo, form form.Photo, geoApi string) error {
|
|||
}
|
||||
|
||||
if err := model.UpdateTitle(model.ClassifyLabels()); err != nil {
|
||||
log.Warn(err)
|
||||
log.Info(err)
|
||||
}
|
||||
|
||||
if err := model.IndexKeywords(); err != nil {
|
||||
|
@ -184,7 +184,7 @@ func (m *Photo) Save() error {
|
|||
m.UpdateYearMonth()
|
||||
|
||||
if err := m.UpdateTitle(labels); err != nil {
|
||||
log.Warn(err)
|
||||
log.Info(err)
|
||||
}
|
||||
|
||||
if m.DetailsLoaded() {
|
||||
|
|
|
@ -108,7 +108,7 @@ func (m *Photo) Optimize() (updated bool, err error) {
|
|||
m.UpdateYearMonth()
|
||||
|
||||
if err := m.UpdateTitle(labels); err != nil {
|
||||
log.Warn(err)
|
||||
log.Info(err)
|
||||
}
|
||||
|
||||
if m.DetailsLoaded() {
|
||||
|
|
|
@ -36,7 +36,7 @@ func Exif(fileName string) (data Data, err error) {
|
|||
func (data *Data) Exif(fileName string) (err error) {
|
||||
defer func() {
|
||||
if e := recover(); e != nil {
|
||||
err = fmt.Errorf("metadata: %s (exif panic)", e)
|
||||
err = fmt.Errorf("metadata: %s in %s (exif panic)", e, txt.Quote(filepath.Base(fileName)))
|
||||
}
|
||||
}()
|
||||
|
||||
|
@ -61,7 +61,7 @@ func (data *Data) Exif(fileName string) (err error) {
|
|||
if err.Error() == "no exif header" {
|
||||
return fmt.Errorf("metadata: no exif header in %s", txt.Quote(filepath.Base(fileName)))
|
||||
} else {
|
||||
log.Warnf("metadata: %s (parse jpeg)", err)
|
||||
log.Warnf("metadata: %s in %s", err, txt.Quote(filepath.Base(fileName)))
|
||||
}
|
||||
} else {
|
||||
parsed = true
|
||||
|
@ -81,7 +81,7 @@ func (data *Data) Exif(fileName string) (err error) {
|
|||
if err.Error() == "file does not have EXIF" {
|
||||
return fmt.Errorf("metadata: no exif header in %s", txt.Quote(filepath.Base(fileName)))
|
||||
} else {
|
||||
log.Warnf("metadata: %s (parse png)", err)
|
||||
log.Warnf("metadata: %s in %s", err, txt.Quote(filepath.Base(fileName)))
|
||||
}
|
||||
} else {
|
||||
parsed = true
|
||||
|
|
Loading…
Reference in a new issue