copyWith method
Create a copy with modified fields
Implementation
LogEntry copyWith({
DateTime? timestamp,
LogLevel? level,
String? message,
String? tag,
Object? error,
StackTrace? stackTrace,
Map<String, dynamic>? context,
String? loggerName,
}) {
return LogEntry(
timestamp: timestamp ?? this.timestamp,
level: level ?? this.level,
message: message ?? this.message,
tag: tag ?? this.tag,
error: error ?? this.error,
stackTrace: stackTrace ?? this.stackTrace,
context: context ?? this.context,
loggerName: loggerName ?? this.loggerName,
);
}