diff --git a/core/support/src/main/kotlin/au/com/dius/pact/core/support/Annotations.kt b/core/support/src/main/kotlin/au/com/dius/pact/core/support/Annotations.kt index e13dcfd09..da7147404 100644 --- a/core/support/src/main/kotlin/au/com/dius/pact/core/support/Annotations.kt +++ b/core/support/src/main/kotlin/au/com/dius/pact/core/support/Annotations.kt @@ -1,10 +1,12 @@ package au.com.dius.pact.core.support -import io.github.oshai.kotlinlogging.KLogging +import io.github.oshai.kotlinlogging.KotlinLogging import kotlin.reflect.KClass import kotlin.reflect.full.superclasses -object Annotations : KLogging() { +private val logger = KotlinLogging.logger {} + +object Annotations { /** * Searches for the given annotation, first up the class hierarchy, then on enclosing classes if there are any */ diff --git a/core/support/src/main/kotlin/au/com/dius/pact/core/support/HttpClient.kt b/core/support/src/main/kotlin/au/com/dius/pact/core/support/HttpClient.kt index 6367e5937..cf999030d 100644 --- a/core/support/src/main/kotlin/au/com/dius/pact/core/support/HttpClient.kt +++ b/core/support/src/main/kotlin/au/com/dius/pact/core/support/HttpClient.kt @@ -4,7 +4,7 @@ import au.com.dius.pact.core.support.Auth.Companion.DEFAULT_AUTH_HEADER import au.com.dius.pact.core.support.expressions.DataType import au.com.dius.pact.core.support.expressions.ExpressionParser import au.com.dius.pact.core.support.expressions.ValueResolver -import io.github.oshai.kotlinlogging.KLogging +import io.github.oshai.kotlinlogging.KotlinLogging import org.apache.hc.client5.http.auth.AuthScope import org.apache.hc.client5.http.auth.CredentialsProvider import org.apache.hc.client5.http.auth.UsernamePasswordCredentials @@ -25,6 +25,8 @@ import org.apache.hc.core5.ssl.SSLContexts import org.apache.hc.core5.util.TimeValue import java.net.URI +private val logger = KotlinLogging.logger {} + /** * Authentication options */ @@ -81,7 +83,7 @@ private class RetryAnyMethod( /** * HTTP client support functions */ -object HttpClient : KLogging() { +object HttpClient { /** * Creates a new HTTP client diff --git a/core/support/src/main/kotlin/au/com/dius/pact/core/support/Metrics.kt b/core/support/src/main/kotlin/au/com/dius/pact/core/support/Metrics.kt index 9b0e0c945..017e71ee5 100644 --- a/core/support/src/main/kotlin/au/com/dius/pact/core/support/Metrics.kt +++ b/core/support/src/main/kotlin/au/com/dius/pact/core/support/Metrics.kt @@ -1,13 +1,15 @@ package au.com.dius.pact.core.support import au.com.dius.pact.core.support.Utils.lookupVersion -import io.github.oshai.kotlinlogging.KLogging +import io.github.oshai.kotlinlogging.KotlinLogging import org.apache.commons.codec.digest.DigestUtils import org.apache.hc.client5.http.fluent.Request import org.apache.hc.core5.http.message.BasicNameValuePair import java.util.UUID import java.util.concurrent.TimeUnit +private val logger = KotlinLogging.logger {} + /** * Metric events to send */ @@ -71,7 +73,7 @@ sealed class MetricEvent { * This sends anonymous metrics to a Google Analytics account. It is used to track usage of JVM and operating system * versions. This can be disabled by setting the 'pact_do_not_track' system property or environment variable to 'true'. */ -object Metrics : KLogging() { +object Metrics { var warningLogged: Boolean = false const val UA_ACCOUNT = "UA-117778936-1" diff --git a/core/support/src/main/kotlin/au/com/dius/pact/core/support/Utils.kt b/core/support/src/main/kotlin/au/com/dius/pact/core/support/Utils.kt index 8de8f232b..e5fb9b4a3 100644 --- a/core/support/src/main/kotlin/au/com/dius/pact/core/support/Utils.kt +++ b/core/support/src/main/kotlin/au/com/dius/pact/core/support/Utils.kt @@ -1,6 +1,6 @@ package au.com.dius.pact.core.support -import io.github.oshai.kotlinlogging.KLogging +import io.github.oshai.kotlinlogging.KotlinLogging import org.apache.commons.lang3.RandomUtils import java.io.IOException import java.net.ServerSocket @@ -10,11 +10,13 @@ import kotlin.math.pow import kotlin.reflect.full.cast import kotlin.reflect.full.declaredMemberProperties +private val logger = KotlinLogging.logger {} + /** * Common utility functions */ @Suppress("TooManyFunctions") -object Utils : KLogging() { +object Utils { /** * Recursively extracts a sequence of keys from a recursive Map structure */