copyWith method
Implementation
DatumLogger copyWith({
bool? enabled,
bool? colors,
LogLevel? minimumLevel,
Map<String, LogSampler>? samplers,
bool? enablePerformanceLogging,
Duration? performanceThreshold,
}) {
return DatumLogger(
enabled: enabled ?? this.enabled,
colors: colors ?? this.colors,
minimumLevel: minimumLevel ?? this.minimumLevel,
samplers: samplers ?? this.samplers,
enablePerformanceLogging: enablePerformanceLogging ?? this.enablePerformanceLogging,
performanceThreshold: performanceThreshold ?? this.performanceThreshold,
// Preserve the sink across copies. Note copyWith deliberately does NOT
// expose a `sink` parameter: keeping its signature unchanged means an
// `implements DatumLogger` class overriding copyWith stays valid.
sink: _sink,
);
}