Obfuscation & Omission
Mask auth headers, tokens, and other PII before Ktor network data reaches the native Luciq SDK, or omit specific requests from logging entirely.
Before network data is sent to the native Luciq SDK, you can modify it (obfuscation) or prevent it from being logged (omission).
Obfuscate logs
Use NetworkLoggerKmp.obfuscateLog to strip or mask sensitive data (e.g. auth headers, tokens, PII):
NetworkLoggerKmp.obfuscateLog { data ->
data.copy(
requestHeaders = data.requestHeaders.filterKeys { it != "Authorization" },
requestBody = null // or redact parts of the body
)
}The callback receives NetworkData and returns a modified NetworkData. The returned object is what gets sent to the native SDK.
Omit logs
Use NetworkLoggerKmp.omitLog to skip logging for certain requests (e.g. internal or health-check endpoints):
NetworkLoggerKmp.omitLog { data ->
data.url.contains("/internal/") || data.url.contains("/health")
}If the callback returns true, the network call is not logged.
Last updated