Skip to content

How to distinguish which process the output stream line comes from #468

@LookRain

Description

@LookRain

I have a output stream looking like this, however it doesn't work reliably because some lines simply do not have a prefix.

const outputStream = {
  write: (data) => {
    if (['[SDK]', '[bundle]', '[dts]'].some((str) => data.includes(str))) {
      sdkStream.write(data);
    } else if (data.includes('[Demo App]')) {
      demoStream.write(data);
    }
  },
};

May I know if there's any way I can tell reliably which process a line is coming form? Many thanks!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions