consolo-adaptor-winston
v0.1.0
Published
Consolo logging adaptor implementation for the great winston logger.
Downloads
1
Maintainers
Readme
Consolo Winston Adaptor
A Consolo adaptor that allows Consolo to use winston.
Usage
Install and add to your app as follows:
npm install --save consolo consolo-adaptor-winston
Then, in your app.js
file:
import winston from 'winston';
import { enhanceConsole } from 'consolo';
import WinstonAdaptor from 'consolo-adaptor-winston';
const adaptor = new WinstonAdaptor(new (winston.Logger)({
transports: [
// configure your transports…
],
}));
enhanceConsole(adaptor);
console.log('error', 'some error message');
License
This package is part of the Consolo monorepo.