Logging System
HoloMIT SDK includes a lightweight, centralized logging system designed to help developers monitor the behavior of core systems, debug runtime issues, and manage log verbosity across modules. It supports dynamic configuration both at runtime and via static files.
Log Levels
Logging is managed through the LogDetail
enum, which defines the severity and verbosity of log messages:
public enum LogDetail {
None = 0,
Log = 1, // Standard log (e.g., info, flow)
Warning = 2, // Non-critical issues
Error = 4, // Critical failures
Verbose = Log | Warning | Error // Enable all logs
}
Each log level can be used independently or combined via bitmask flags. For example, enabling only warnings and errors is done by setting: LogDetail.Warning | LogDetail.Error
.
Configuration Methods
1. Via configuration file (Recommended)
You can define the default log level by editing your configuration file:
{
"logLevel": "7"
}
Supported values:
"None" - "0"
"Log - "1""
"Warning" - "2"
"Error" - "4"
"Verbose" - "7"
This configuration is loaded automatically on startup and applied globally across all modules.
2. Via Runtime API
You can dynamically update the log level at runtime using:
Debug.UpdateLogLevel(LogDetail.Warning | LogDetail.Error);
This is useful for enabling or reducing verbosity during testing, profiling, or in production environments with live toggles.
Log Integration
All major systems in the SDK route their log messages through the unified logging utility. Examples:
Debug.Log("Capture started successfully");
Debug.LogWarning("Low bandwidth detected");
Debug.LogError("Session connection failed");
By default, all levels are enabled.
Best Practices
- Use
"Verbose"
when diagnosing startup or network issues. - Use
"Warning | Error"
in production to reduce noise while capturing critical events. - Adjust log level dynamically from UI or debug menus to enhance in-field testing workflows.