0.3.0 • Published 8 years ago

process-console-log v0.3.0

Weekly downloads
1
License
ISC
Repository
github
Last release
8 years ago

Process Logger

Override console.log in a Node.js child process to return properly typed output.

Problem

Types are difficult to determine from a child process output.

console.log('12', 12); -> 12 12

Is the output a 'string' or a 'number'?

console.log({a: {b: { c: {d: 1}}}}) -> 'object Object'

What's inside the object?

Solution

import {initProcessLogger} from 'process-logger';
initProcessLogger();// overrides window.console.log

Parse the output.

import {parser} from './process-logger';

parser(output1); // logs: '12' 12
parser(output2); // logs: {a: {b: {c: {d: 1}}}}
0.3.0

8 years ago

1.0.0

8 years ago

0.2.6

8 years ago

0.2.5

8 years ago

0.2.4

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.0

8 years ago