Logger utils for the popular Winston Node.js logging framework.
- Winston console logger
- Winston file logger with daily rotation
- Morgan setup
$ yarn add @element-gaming/logger-utils
$ npm install @element-gaming/logger-utils
const { logger } = require('@element-gaming/logger-utils');
logger.log('info', 'This is information', {data: ''})
logger.info('This is information!')
logger.warn('This is a warning!')
logger.error('This is a problem!')
logger.verbose('This is verbose!')
logger.debug('This is a debug!')
const { morgan } = require('@element-gaming/logger-utils');
app.use(morgan.successHandler);
app.use(morgan.errorHandler);
- Learn more in the Contributing guide Please take a look at the contributing guide.
- Fork this project
- Install dependencies (
yarn or npm install
)
MIT © 2020 Element Gaming ASD