This commit is contained in:
root
2025-11-25 09:56:15 +03:00
commit 68c8f0e80d
23717 changed files with 3200521 additions and 0 deletions

View File

@ -0,0 +1,22 @@
// @flow
import type {
WriterType,
} from '../types';
const createBlockingWriter = (stream: stream$Writable): WriterType => {
return {
write: (message: string) => {
stream.write(message + '\n');
},
};
};
export default (): WriterType => {
// eslint-disable-next-line no-process-env
const targetStream = (process.env.ROARR_STREAM || 'STDOUT').toUpperCase();
const stream = targetStream.toUpperCase() === 'STDOUT' ? process.stdout : process.stderr;
return createBlockingWriter(stream);
};