open-cli-tools / open-cli-tools/concurrently

How to distinguish which process the output stream line comes from

Open
#468 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

pull request welcome
Dominant language
TypeScript
Stars
7.9k
Forks
281
Avg merge
17h 12m
Merged PRs (30d)
1

Description

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!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue mentions only an outputStream.write handler and no repository file or test. Start by locating the output-stream handling and process-prefixing entry points, then check whether each process's identity is preserved for every emitted line. Done means a documented or tested reliable way to associate each line with its originating process.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.