Managing Log Annotations in Different Parts of a Stream

How to have different logs annotations in different parts of the same stream?

For example

Stream.merge(
  Stream.fromSchedule(Schedule.spaced('1 second')).pipe(
    Stream.tap((x) => Effect.log(x)),
  ),
  Stream.fromSchedule(Schedule.spaced('2 second')).pipe(
    Stream.tap((x) => Effect.log(x)),
  ),
)


I understand, that i can apply annotateLogs directly to the Effect.log in this case, but i need to provide the annotation for the whole stream pipeline
Was this page helpful?