single-line-logger

1.0.3 • Public • Published

single-line-logger

A thin layer on top of console.log() that makes sure the output stays on one line.

It's particularly useful if your log-tracking tool shows the output of console.log() on multiple lines and in inverse order (e.g. Datadog, Graylog).

Uses serialize-error npm library to serialize non-primitive objects w/ minor tweaks that:

  • optimize memory usage
  • don't display the "internal" fields of errors (the ones that start w/ "_")

Installation

$ npm install single-line-logger

Quick Start

const { _lg, _err } = require('single-line-logger')

// log to stdout on a single line
_lg('Error:', new Error('my multiline error #1'))

// log to stderr on a single line
_err('Error:', new Error('my multiline error #2'))

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.356latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.356
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i single-line-logger

Weekly Downloads

22

Version

1.0.3

License

MIT

Unpacked Size

10.8 kB

Total Files

10

Last publish

Collaborators

  • yeskas