1.0.2 • Published 4 years ago
custom.stdout v1.0.2
Allows the developer to shows logs in a fixed area of output. It could be useful:
- to show state
- to show errors
- to show important messages
Usage
npm install custom.stdout --save
import { StdoutController } from 'custom.stdout';
// Create instance. As argument we should provide target stream.
// As usual it's process.stdout
const stdout = new StdoutController(process.stdout);
// To post logs into "normal" (common area):
stdout.out('LOGS INTO COMMON AREA');
// To post logs into "fixed" area just define ID of it
stdout.out('Important message', 'messages');
stdout.out('Operations done: 43\nRAM used: 324Mb', 'operations');