What Problem Does This Solve?
During development, you want detailed logs to debug issues—what methods are called, what data is passed, when errors occur. In production, you want minimal logging to avoid performance overhead and log spam.LevelFilter controls how much the LCK SDK logs to the console, letting you dial logging verbosity up for debugging or down for release builds.
When to Use This
SetLevelFilter when:
- Development: Use
DebugorTraceto see detailed SDK behavior - Testing/QA: Use
Infoto see important events without noise - Production: Use
WarnorErrorto only log problems - Release builds: Use
Offto disable all SDK logging
Quick Example
Log Levels Explained
Off
No logging at all. The SDK produces zero console output. When to use:- Shipping builds where you don’t want any SDK logs
- Performance-critical sections
- Final release to customers
Error
Critical errors only. Only logs when something breaks. When to use:- Production/release builds
- You only want to know when things fail
- Minimize log noise
- Initialization failures
- Recording errors
- Permission denials
- Platform incompatibility
Warn
Errors + warnings. Problems that might cause issues but aren’t critical. When to use:- Staging/beta builds
- You want to catch potential issues before they become errors
- Production with monitoring
- Low storage warnings
- Deprecated API usage
- Suboptimal configurations
- Performance concerns
Info
Important events. SDK lifecycle events and state changes. When to use:- QA/testing builds
- You want visibility into what the SDK is doing
- Troubleshooting user reports
- SDK initialization
- Recording start/stop
- Quality changes
- Camera configuration
Debug
Everything + debug details. Internal SDK operations and parameter values. When to use:- Active development
- Debugging SDK integration issues
- Understanding SDK behavior
- Reproducing bugs
- Method calls with parameters
- Internal state changes
- Configuration details
- Data flow
Trace
Maximum verbosity. Frame-by-frame details, extremely detailed logging. When to use:- Deep debugging of specific issues
- Understanding exact execution flow
- Performance profiling
- Reporting bugs to LIV support
- Every frame’s processing
- Memory allocations
- Texture updates
- Encoder buffer states
- Network packet details (streaming)
Recommended Settings by Build Type
| Build Type | Recommended Level | Rationale |
|---|---|---|
| Editor (Development) | Debug | See what SDK is doing during integration |
| Development Build | Info | Track SDK events without overwhelming detail |
| QA/Testing Build | Warn | Catch warnings before release |
| Staging/Beta | Error | Production-like with error visibility |
| Release/Production | Off or Error | Minimize logs for performance and cleanliness |
Common Patterns
Build-specific logging
Runtime toggle (debug menu)
Platform-specific
Temporary verbose logging for debugging
Enum Values
| Level | Value | Output | Performance Impact |
|---|---|---|---|
Off | Silent | Nothing | None |
Error | Errors only | Critical failures | Minimal |
Warn | Errors + warnings | Potential problems | Minimal |
Info | Important events | SDK lifecycle | Low |
Debug | Detailed info | Internal operations | Moderate |
Trace | Everything | Frame-by-frame | High |
API Reference
Set Log Level
level— Desired logging verbosity
Performance Considerations
Impact by level:Off,Error,Warn— Negligible impactInfo— Very low impact (under 1% typical)Debug— Low impact (1-3% typical)Trace— Moderate impact (5-10% possible)
Error or Off.
Debugging Tips
Capture logs to file
Conditional compilation
DEBUG_LCK in Player Settings → Scripting Define Symbols when debugging.
Best Practices
Set early — Configure log level in
Awake() before SDK initializationBuild-specific — Use preprocessor directives for different builds
Ship clean — Use
Error or Off in productionDebug temporarily — Increase verbosity when debugging, restore after
Related
- LckCore — Where to set log level
- Debugging Guide — Troubleshooting SDK issues
- Performance Optimization — Performance best practices