configure static method
void
configure({
- ZenLogLevel? level,
- bool? rxTracking,
- bool? routeLogging,
- bool? performanceTracking,
- bool? metrics,
- bool? autoDispose,
- Duration? cacheExpiry,
- int? disposeTimeout,
- bool? strict,
- bool? circularDependencyCheck,
- bool? dependencyVisualization,
- bool? useRxTrack,
- @Deprecated('Use level parameter instead') bool? debugLogs,
Apply custom configuration with fine-grained control
Example:
ZenConfig.configure(
level: ZenLogLevel.info,
performanceTracking: true,
strict: true,
);
Implementation
static void configure({
// Logging
ZenLogLevel? level,
bool? rxTracking,
bool? navigationLogging,
bool? routeLogging,
// Performance & Metrics
bool? performanceTracking,
bool? metrics,
// Lifecycle
bool? autoDispose,
Duration? cacheExpiry,
int? disposeTimeout,
// Development Features
bool? strict,
bool? circularDependencyCheck,
bool? dependencyVisualization,
bool? useRxTrack,
// Legacy support
@Deprecated('Use level parameter instead') bool? debugLogs,
}) {
// Logging
if (level != null) logLevel = level;
if (rxTracking != null) enableRxTracking = rxTracking;
if (navigationLogging != null) enableNavigationLogging = navigationLogging;
if (routeLogging != null) enableRouteLogging = routeLogging;
// Performance & Metrics
if (performanceTracking != null) {
enablePerformanceTracking = performanceTracking;
}
if (metrics != null) enableMetrics = metrics;
// Lifecycle
if (autoDispose != null) enableAutoDispose = autoDispose;
if (cacheExpiry != null) controllerCacheExpiry = cacheExpiry;
if (disposeTimeout != null) disposeTimeoutMs = disposeTimeout;
// Development Features
if (strict != null) strictMode = strict;
if (circularDependencyCheck != null) {
checkForCircularDependencies = circularDependencyCheck;
}
if (dependencyVisualization != null) {
enableDependencyVisualization = dependencyVisualization;
}
if (useRxTrack != null) useRxTracking = useRxTrack;
// Legacy support
if (debugLogs != null) {
logLevel = debugLogs ? ZenLogLevel.debug : ZenLogLevel.warning;
}
}