Documentation Index
Fetch the complete documentation index at: https://docs.portalhq.io/llms.txt
Use this file to discover all available pages before exploring further.
Function Signature
Future<void> setLogLevel(PortalLogLevel level)
Description
Sets the log verbosity for the Portal SDK. The change takes effect immediately across all SDK components, including the native iOS and Android layers.
Can be called before or after initialize(). When called before initialization, only the Dart-side logger is configured. When called after, the log level is also propagated to the native SDK.
Parameters
| Parameter | Type | Required | Description |
|---|
level | PortalLogLevel | Yes | The desired log verbosity level |
PortalLogLevel values
| Value | Description |
|---|
PortalLogLevel.none | No output. This is the default. |
PortalLogLevel.error | Failures only — failed transactions, network errors, binary crashes. |
PortalLogLevel.warn | Non-fatal unexpected conditions — deprecated usage, retries, slow responses. |
PortalLogLevel.info | Operational milestones — signing started, share generated, connection opened. |
PortalLogLevel.debug | Full internals — request/response payloads, timing, state transitions. |
Each level includes all levels above it in severity.
Returns
void
Example
import 'package:portal_flutter/portal_flutter.dart';
final portal = Portal();
await portal.initialize(apiKey: 'YOUR_CLIENT_API_KEY');
// Enable debug logging during development
await portal.setLogLevel(PortalLogLevel.debug);
// Create wallet — all SDK log output is now visible
final addresses = await portal.createWallet();
print('Ethereum address: ${addresses.ethereum}');
// Reduce to errors only
await portal.setLogLevel(PortalLogLevel.error);
Errors
| Code | Description |
|---|
SET_LOG_LEVEL_ERROR | Failed to set the native log level |