Demote wakeQueueIfEventsPending and thumbnailer log lines to debug (#3520)

This just produces a lot of noise in the logs for no reason and they
didn't even say which queues or thumbnails were relevant.

Signed-off-by: Neil Alexander <git@neilalexander.dev>

---------

Signed-off-by: Neil Alexander <git@neilalexander.dev>
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
This commit is contained in:
Neil 2025-01-29 18:39:29 +00:00 committed by GitHub
parent 8872299b43
commit 57bbba3051
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 6 additions and 6 deletions

View file

@ -147,7 +147,7 @@ func (oq *destinationQueue) wakeQueueIfEventsPending(forceWakeup bool) {
// or if forceWakeup is true. Otherwise there is no reason to start the
// queue goroutine and waste resources.
if forceWakeup || eventsPending() {
logrus.Info("Starting queue due to pending events or forceWakeup")
logrus.Debugf("Starting queue %q -> %q due to pending events or forceWakeup", oq.origin, oq.destination)
oq.wakeQueueAndNotify()
}
}

View file

@ -86,7 +86,7 @@ func getActiveThumbnailGeneration(dst types.Path, _ types.ThumbnailSize, activeT
activeThumbnailGeneration.Lock()
defer activeThumbnailGeneration.Unlock()
if activeThumbnailGenerationResult, ok := activeThumbnailGeneration.PathToResult[string(dst)]; ok {
logger.Info("Waiting for another goroutine to generate the thumbnail.")
logger.Debugf("Waiting for another goroutine to generate the thumbnail %q", dst)
// NOTE: Wait unlocks and locks again internally. There is still a deferred Unlock() that will unlock this.
activeThumbnailGenerationResult.Cond.Wait()
@ -115,7 +115,7 @@ func broadcastGeneration(dst types.Path, activeThumbnailGeneration *types.Active
activeThumbnailGeneration.Lock()
defer activeThumbnailGeneration.Unlock()
if activeThumbnailGenerationResult, ok := activeThumbnailGeneration.PathToResult[string(dst)]; ok {
logger.Info("Signalling other goroutines waiting for this goroutine to generate the thumbnail.")
logger.Debugf("Signalling other goroutines waiting for this goroutine to generate the thumbnail %q", dst)
// Note: errorReturn is a named return value error that is signalled from here to waiting goroutines
activeThumbnailGenerationResult.Err = errorReturn
activeThumbnailGenerationResult.Cond.Broadcast()
@ -136,7 +136,7 @@ func isThumbnailExists(
config.Width, config.Height, config.ResizeMethod,
)
if err != nil {
logger.Error("Failed to query database for thumbnail.")
logger.Errorf("Failed to query database for thumbnail %q", dst)
return false, err
}
if thumbnailMetadata != nil {

View file

@ -153,7 +153,7 @@ func createThumbnail(
"ActualWidth": width,
"ActualHeight": height,
"processTime": time.Now().Sub(start),
}).Info("Generated thumbnail")
}).Debugf("Generated thumbnail %q", dst)
stat, err := os.Stat(string(dst))
if err != nil {

View file

@ -191,7 +191,7 @@ func createThumbnail(
"ActualWidth": width,
"ActualHeight": height,
"processTime": time.Since(start),
}).Info("Generated thumbnail")
}).Debugf("Generated thumbnail %q", dst)
stat, err := os.Stat(string(dst))
if err != nil {