Skip to content

Commit 57bbba3

Browse files
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 <[email protected]> --------- Signed-off-by: Neil Alexander <[email protected]> Co-authored-by: Neil Alexander <[email protected]>
1 parent 8872299 commit 57bbba3

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

federationapi/queue/destinationqueue.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ func (oq *destinationQueue) wakeQueueIfEventsPending(forceWakeup bool) {
147147
// or if forceWakeup is true. Otherwise there is no reason to start the
148148
// queue goroutine and waste resources.
149149
if forceWakeup || eventsPending() {
150-
logrus.Info("Starting queue due to pending events or forceWakeup")
150+
logrus.Debugf("Starting queue %q -> %q due to pending events or forceWakeup", oq.origin, oq.destination)
151151
oq.wakeQueueAndNotify()
152152
}
153153
}

mediaapi/thumbnailer/thumbnailer.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func getActiveThumbnailGeneration(dst types.Path, _ types.ThumbnailSize, activeT
8686
activeThumbnailGeneration.Lock()
8787
defer activeThumbnailGeneration.Unlock()
8888
if activeThumbnailGenerationResult, ok := activeThumbnailGeneration.PathToResult[string(dst)]; ok {
89-
logger.Info("Waiting for another goroutine to generate the thumbnail.")
89+
logger.Debugf("Waiting for another goroutine to generate the thumbnail %q", dst)
9090

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

mediaapi/thumbnailer/thumbnailer_bimg.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func createThumbnail(
153153
"ActualWidth": width,
154154
"ActualHeight": height,
155155
"processTime": time.Now().Sub(start),
156-
}).Info("Generated thumbnail")
156+
}).Debugf("Generated thumbnail %q", dst)
157157

158158
stat, err := os.Stat(string(dst))
159159
if err != nil {

mediaapi/thumbnailer/thumbnailer_nfnt.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ func createThumbnail(
191191
"ActualWidth": width,
192192
"ActualHeight": height,
193193
"processTime": time.Since(start),
194-
}).Info("Generated thumbnail")
194+
}).Debugf("Generated thumbnail %q", dst)
195195

196196
stat, err := os.Stat(string(dst))
197197
if err != nil {

0 commit comments

Comments
 (0)