Skip to content

Commit

Permalink
Call the withOpenTracingLogs extension function on your loggers.
Browse files Browse the repository at this point in the history
  • Loading branch information
fstien committed Nov 12, 2020
1 parent 4c96d82 commit db69e50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Application.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.github.fstien

import com.fasterxml.jackson.databind.SerializationFeature
import com.github.fstien.kotlin.logging.opentracing.decorator.withOpenTracingLogs
import com.zopa.ktor.opentracing.OpenTracingServer
import com.zopa.ktor.opentracing.ThreadContextElementScopeManager
import io.jaegertracing.Configuration
Expand All @@ -16,7 +17,7 @@ import mu.KotlinLogging

fun main(args: Array<String>): Unit = io.ktor.server.netty.EngineMain.main(args)

private val logger = KotlinLogging.logger {}
private val logger = KotlinLogging.logger {}.withOpenTracingLogs()

@Suppress("unused") // Referenced in application.conf
@kotlin.jvm.JvmOverloads
Expand Down
3 changes: 2 additions & 1 deletion src/EarthquakeClient.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.github.fstien

import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import com.github.fstien.kotlin.logging.opentracing.decorator.withOpenTracingLogs
import com.zopa.ktor.opentracing.OpenTracingClient
import com.zopa.ktor.opentracing.span
import io.ktor.client.*
Expand All @@ -16,7 +17,7 @@ import java.time.LocalDateTime
import java.util.*


private val logger = KotlinLogging.logger {}
private val logger = KotlinLogging.logger {}.withOpenTracingLogs()

class EarthquakeClient {
val client = HttpClient(Apache) {
Expand Down

0 comments on commit db69e50

Please sign in to comment.