Skip to content

Commit

Permalink
Fikser feil i logging av error etter oppdatering
Browse files Browse the repository at this point in the history
  • Loading branch information
ramrock93 committed May 21, 2024
1 parent 5b27ebe commit 3f5f71e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ class OppslagsKlientKonfig(

override fun <T : Any, E : Throwable> onError(context: RetryContext, callback: RetryCallback<T, E>, throwable: Throwable) {
val currentTry = context.retryCount
val contextString = context.getAttribute("context.name") as String
val contextName = context.getAttribute("context.name") as String // Navnet på metoden som kalles
val backoff = context.getAttribute("backOffContext")!!
val nextInterval = backoff.nextInterval()

logger.warn("Forsøk {} av {}, {}", currentTry, maxAttempts, contextString.split(" ")[2])
logger.warn("Forsøk {} av {}, {}", currentTry, maxAttempts, contextName)

if (currentTry < maxAttempts) logger.info("Forsøker om: {} ms", nextInterval)
}
Expand Down

0 comments on commit 3f5f71e

Please sign in to comment.