2.0.4 • Published 5 years ago

@pshaw/logger v2.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

Logger

A preformatted, opinionated logger

Installation

npm install --save @pshaw/logger @pshaw/winston-formats winston

or

yarn add @pshaw/logger @pshaw/winston-formats winston

Examples

const { join } = require('path');

const { logger, consoleTransport, fileTransport } = require('@pshaw/logger');

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

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

const taggedL = l.child({ tags: 'tagged' });
taggedL.info('test');

This documentation was generated using writeme

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.5.0

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago