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.

Set the log level

Call portal.setLogLevel(_:) after initializing your Portal instance. The change takes effect immediately across all SDK components.
Set the log level before calling any other SDK methods to capture all output from the start.
  • Development: .debug — see all SDK activity while building your integration.
  • QA / staging: .info or .warn — surface operational milestones and anomalies without noise.
  • Production: .none (default) — no logs emitted. Use .error if you want to forward failures to a crash reporter.
Do not use .debug in production. Debug output includes request payloads and internal state that may contain sensitive data.

Log output

Logs are written using os_log to the io.portalhq.ios subsystem under the General category. You can filter them in the Console app or Xcode’s debug console using:
Related Documentation