Skip to main content
By default, the Portal SDK emits no logs. You can enable logging at any verbosity level to help debug integration issues or monitor SDK behavior in development.

Log levels

The PortalLogLevel enum defines five levels. Each level includes all levels above it in severity.
LevelWhat is logged
PortalLogLevel.NONENothing. This is the default.
PortalLogLevel.ERRORFailures only — failed transactions, network errors, binary crashes.
PortalLogLevel.WARNUnexpected but non-fatal conditions — deprecated usage, retries, slow responses.
PortalLogLevel.INFONormal operational milestones — signing started, share generated, connection opened.
PortalLogLevel.DEBUGEverything, including internals — request/response payloads, timing, state transitions.

Set the log level

Call portal.setLogLevel() after initializing your Portal instance. The change takes effect immediately across all SDK components.
import io.portalhq.android.Portal
import io.portalhq.android.utils.PortalLogLevel

class MainActivity : AppCompatActivity() {
    lateinit var portal: Portal

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        portal = Portal("YOUR_CLIENT_API_KEY")

        // Enable debug logging during development
        portal.setLogLevel(PortalLogLevel.DEBUG)
    }
}
Set the log level before calling any other SDK methods to capture all output from the start.
  • Development: PortalLogLevel.DEBUG — see all SDK activity while building your integration.
  • QA / staging: PortalLogLevel.INFO or PortalLogLevel.WARN — surface operational milestones and anomalies without noise.
  • Production: PortalLogLevel.NONE (default) — no logs emitted. Use PortalLogLevel.ERROR if you want to forward failures to a crash reporter.
Do not use PortalLogLevel.DEBUG in production. Debug output includes request payloads and internal state that may contain sensitive data.

Log output

Logs are written to Android’s standard logging system and appear in Logcat. You can filter them in Android Studio’s Logcat window or via adb logcat by searching for the PortalSDK tag:
tag:PortalSDK