Quick Start
Enable logging by setting thelogLevel parameter when initializing Portal:
Log Levels
The SDK supports five log levels, ordered by verbosity:| Level | Description | Use Case |
|---|---|---|
'none' | No logging output (default) | Production environments |
'error' | Only errors and critical failures | Production with minimal logging |
'warn' | Errors and warnings | Staging and production |
'info' | Errors, warnings, and informational messages | Development and staging |
'debug' | All log messages including detailed debugging information | Local development only |
'none' - No logs are emitted unless you explicitly configure logging.
Logger Interface
Your custom logger must implement these four methods:Production Logger with Timestamps
For better observability, add timestamps to your logs:How Logging Works
- SDK handles level filtering - The SDK filters messages based on your
logLevelsetting before calling your logger methods - Logger handles output - Your logger is responsible only for formatting and outputting the messages
- No performance impact when disabled - When
logLevelis'none', log messages are not generated
Next Steps
- MPC Progress Callbacks - Monitor MPC operation progress
- Portal API Methods - Learn about available SDK methods
- Error Codes - Understand Portal error codes