@trenskow/log

2.0.14 • Public • Published

@trenskow/log

Usage

Just a simple function which lets you log JSON to the console.

const log = require('@trenskow/log');

await log('info', {
	state: 'running',
	port: process.env.PORT
});

This will output to stdout.

{"time":"2020-01-23T10:16:55.289Z","level":"info","state":"running","port":3000}

Debugging

Use it together with jwalker to get pretty printing while debugging.

node ./index.js | jwalker

License

See LICENSE.

Dependents (1)

Package Sidebar

Install

npm i @trenskow/log

Weekly Downloads

4

Version

2.0.14

License

BSD-3-Clause

Unpacked Size

4.79 kB

Total Files

6

Last publish

Collaborators

  • trenskow