Logging
This page explains how customers can leverage the option to log additional data from the mobile SDK for the purpose of performance monitoring, issue investigation and analytics
How it works
val setup = SetupConfig(
apiKey = "...",
hosts = listOf(""),
keylessLogsConfiguration = LogsConfiguration(
enabled = true,
logLevel = LogLevels.INFO
),
customLogsConfiguration = LogsConfiguration(
enabled = true
)
)let configuration = SetupConfig(
apiKey: "some api key",
hosts: ["some.host"],
keylessLogsConfiguration: KeylessLogsConfiguration(enabled: true),
customLogsConfiguration: CustomLogsConfiguration(enabled: true, logLevel: .INFO, callback: { event in
print(event)
})
)
Keyless.configure(setupConfiguration: configuration) { error in
// handle error
}Keyless.customLogs.collect { logEvent ->
// handle the logEvent
}val setup = SetupConfig(
apiKey = "...",
hosts = listOf(""),
customLogsConfiguration = LogsConfiguration(
enabled = true,
logLevel = LogLevels.INFO // This is optional and defaults to INFO
)
)var myEventCollection = [LogEvent]()
let configuration = Keyless.SetupConfiguration
.builder
.withApiKey("some api key")
.withHosts(["some.host"])
.withLogging(
keylessLogsConfiguration: KeylessLogsConfiguration(enabled: true, logLevel: .INFO),
customLogsConfiguration: CustomLogsConfiguration(enabled: true, callback: { event in
myEventCollection.append(event)
})
)
.build()
Keyless.configure(setupConfiguration: configuration) { error in
// handle error
}
}Logging Levels
Last updated
Was this helpful?