copyWith method

LogEventDto copyWith({
  1. String? serviceName,
  2. String? serviceInstance,
  3. LogLevel? level,
  4. DateTime? timestamp,
  5. String? message,
  6. String? sender,
  7. bool nullSender = false,
  8. Map<String, String>? path,
  9. Map<String, dynamic>? meta,
})

Implementation

LogEventDto copyWith({
  String? serviceName,
  String? serviceInstance,
  LogLevel? level,
  DateTime? timestamp,
  String? message,
  String? sender,
  bool nullSender = false,
  Map<String, String>? path,
  Map<String, dynamic>? meta,
}) {
  return LogEventDto(
    serviceName: serviceName ?? this.serviceName,
    serviceInstance: serviceInstance ?? this.serviceInstance,
    level: level ?? this.level,
    timestamp: timestamp ?? this.timestamp,
    message: message ?? this.message,
    sender: nullSender ? null : (sender ?? this.sender),
    path: path ?? this.path,
    meta: meta ?? this.meta,
  );
}