Skip to content

Commit

Permalink
feat(sql): CompositeStorageService should log NotFoundException at DEBUG
Browse files Browse the repository at this point in the history
Cuts down the noise a bit.
  • Loading branch information
ajordens committed Jul 8, 2019
1 parent 63cb1f2 commit f0c3533
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package com.netflix.spinnaker.front50.model

import com.netflix.spinnaker.front50.exception.NotFoundException
import org.slf4j.LoggerFactory

class CompositeStorageService(
Expand Down Expand Up @@ -44,6 +45,9 @@ class CompositeStorageService(

try {
return primary.loadObject<T>(objectType, objectKey)
} catch (e: NotFoundException) {
log.debug("{}.loadObject({}, {}) not found (primary)", primary.javaClass.simpleName, objectType, objectKey)
return previous.loadObject<T>(objectType, objectKey)
} catch (e: Exception) {
log.error("{}.loadObject({}, {}) failed (primary)", primary.javaClass.simpleName, objectType, objectKey)
return previous.loadObject<T>(objectType, objectKey)
Expand Down

0 comments on commit f0c3533

Please sign in to comment.