Skip to content

Commit be34aab

Browse files
committed
Pass logLevel in default client constructor
1 parent d43f9f9 commit be34aab

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/commonMain/kotlin/com/algolia/search/client/ClientSearch.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package com.algolia.search.client
33
import com.algolia.search.configuration.CallType
44
import com.algolia.search.configuration.Configuration
55
import com.algolia.search.configuration.ConfigurationSearch
6+
import com.algolia.search.configuration.defaultLogLevel
67
import com.algolia.search.dsl.requestOptionsBuilder
78
import com.algolia.search.endpoint.*
89
import com.algolia.search.helper.encodeBase64
@@ -27,6 +28,7 @@ import com.algolia.search.serialize.RouteLogs
2728
import com.algolia.search.transport.RequestOptions
2829
import com.algolia.search.transport.Transport
2930
import io.ktor.client.features.BadResponseStatusException
31+
import io.ktor.client.features.logging.LogLevel
3032
import io.ktor.http.HttpMethod
3133
import io.ktor.http.HttpStatusCode
3234
import kotlinx.coroutines.*
@@ -46,8 +48,9 @@ public class ClientSearch private constructor(
4648

4749
public constructor(
4850
applicationID: ApplicationID,
49-
apiKey: APIKey
50-
) : this(Transport(ConfigurationSearch(applicationID, apiKey)))
51+
apiKey: APIKey,
52+
logLevel: LogLevel = defaultLogLevel
53+
) : this(Transport(ConfigurationSearch(applicationID, apiKey, logLevel = logLevel)))
5154

5255
public constructor(
5356
configuration: ConfigurationSearch

0 commit comments

Comments
 (0)