@shawp/logger
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

Logger

A preformatted, opinionated logger

Installation

npm install --save @shawp/logger or yarn add @shawp/logger

Examples

const { logger, consoleTransport, fileTransport } = require('@shawp/logger');
const { join } = require('path');

const l = logger()
  .add(consoleTransport())
  .add(
    fileTransport({
      path: join(__dirname, 'file-and-console.log'),
    }),
  );

l.info('test');
l.error('rawr');
l.tag('tagged').info('test');

Readme

Keywords

Package Sidebar

Install

npm i @shawp/logger

Weekly Downloads

10

Version

1.2.0

License

MIT

Unpacked Size

1.2 MB

Total Files

35

Last publish

Collaborators

  • pshaw