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!