Meet npm Pro: unlimited public & private packages + package-based permissions.Learn more »

custom.stdout

1.0.2 • Public • Published

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

Example

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');
 

Install

npm i custom.stdout

DownloadsWeekly Downloads

100

Version

1.0.2

License

Apache 2

Unpacked Size

30.9 kB

Total Files

9

Last publish

Collaborators

  • avatar