Makes log a bit more beautiful

This commit is contained in:
2016-01-25 15:40:15 +01:00
parent 1c39ad27a5
commit 2a46e44b2e

View File

@@ -183,7 +183,7 @@ func (a *appData) indexAlbum(stopChan <-chan struct{},
}
err := batch.Index(AlbumIDString(album.ID), a)
if err != nil {
a.errors <- fmt.Errorf("[INDEX] could not batch indexion of %d: %s", album.ID, err)
a.errors <- fmt.Errorf("[INDEX] could not batch indexion of %s: %s", album, err)
break
}
count++
@@ -198,7 +198,7 @@ func (a *appData) indexAlbum(stopChan <-chan struct{},
}
err := a.index.Index(AlbumIDString(album.ID), a)
if err != nil {
a.errors <- fmt.Errorf("[INDEX] re-indexing %d failed: %s", album.ID, err)
a.errors <- fmt.Errorf("[INDEX] re-indexing %s failed: %s", album, err)
}
case aID, ok := <-albumToDelete:
if ok == false {
@@ -227,12 +227,12 @@ func (a *appData) cacheAlbumDescription(getAlbum <-chan *Album, toIndex chan<- *
err = a.getter.Get(album)
if err != nil {
a.errors <- fmt.Errorf("[CACHE ALBUMS]: getting %d :%s", album.ID, err)
a.errors <- fmt.Errorf("[CACHE ALBUMS]: getting %s :%s", album, err)
continue
}
err = a.db.AddOrUpdate(album)
if err != nil {
a.errors <- fmt.Errorf("[CACHE ALBUMS]: storing %d: %s", album.ID, err)
a.errors <- fmt.Errorf("[CACHE ALBUMS]: storing %s: %s", album, err)
continue
}
toIndex <- album