copyWith method

LogEntry copyWith({
  1. DateTime? timestamp,
  2. LogLevel? level,
  3. String? message,
  4. String? tag,
  5. Object? error,
  6. StackTrace? stackTrace,
  7. Map<String, dynamic>? context,
  8. String? loggerName,
})

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,
  );
}