Skip to content

Commit

Permalink
Bruk prefiks for loggfelt
Browse files Browse the repository at this point in the history
  • Loading branch information
bjerga committed Dec 13, 2024
1 parent b284aae commit 8cef49b
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ import no.nav.helsearbeidsgiver.felles.rapidsrivers.pritopic.Pri
import java.util.UUID

object Log {
fun <T : Any> klasse(value: T) = "class" to value::class.simpleName.orEmpty()
fun <T : Any> klasse(value: T) = "hag_class" to value::class.simpleName.orEmpty()

fun event(value: EventName) = "event" to value.name
fun event(value: EventName) = "hag_event" to value.name

fun priNotis(value: Pri.NotisType) = "pri_notis" to value.name
fun priNotis(value: Pri.NotisType) = "hag_pri_notis" to value.name

fun behov(value: BehovType) = "behov" to value.name
fun behov(value: BehovType) = "hag_behov" to value.name

fun transaksjonId(value: UUID) = "transaksjon_id" to value.toString()
fun transaksjonId(value: UUID) = "hag_transaksjon_id" to value.toString()

fun forespoerselId(value: UUID) = "forespoersel_id" to value.toString()
fun forespoerselId(value: UUID) = "hag_forespoersel_id" to value.toString()

fun selvbestemtId(value: UUID) = "selvbestemt_id" to value.toString()
fun selvbestemtId(value: UUID) = "hag_selvbestemt_id" to value.toString()

fun apiRoute(value: String) = "api_route" to value
fun apiRoute(value: String) = "hag_api_route" to value
}

0 comments on commit 8cef49b

Please sign in to comment.