@julong/winston-mongodb
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

Guide

import winston from 'winston';

const logger = winston.createLogger({
  level: 'info',
  format: winston.format.json(),
  transports: [
    new MongoTransport({ url: 'mongodb://localhost:27017/test_log', collection: 'error_log' }),
  ],
});
options
  • url(default mongodb://localhost:27017/test_log)
  • collection(default error_log)

Readme

Keywords

none

Package Sidebar

Install

npm i @julong/winston-mongodb

Weekly Downloads

2

Version

1.0.3

License

MIT

Unpacked Size

5.12 kB

Total Files

9

Last publish

Collaborators

  • julong