@pshaw/logger
v2.0.4
Published
A preformatted, opinionated logger
Downloads
2
Readme
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