operator + method

LogSink operator +(
  1. LogSink other
)

Fan out to this then other. Each sink applies its own minLevel.

Implementation

LogSink operator +(LogSink other) {
  final left = this is _CompositeSink
      ? (this as _CompositeSink)._sinks
      : [this];
  final right = other is _CompositeSink ? other._sinks : [other];
  return _CompositeSink([...left, ...right]);
}