Skip to content

lensacom/node-winston-logger-adapter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-winston-logger-adapter

This package is used for logging using winston.

Installation

npm install winston-logger-adapter

Example

var logger = require('.');

var config = {
  level: 'debug',
  enableMails: true,
  mailConfig: {
    to: '', // Example Leslie <[email protected]>
    host: "",
    port: 465,
    ssl: true,
    username: '',
    password: '',
    subject: 'Example subject',
    from: 'Example Sender <[email protected]>', // EX: 'I'M A BOT <[email protected]>, ...'
    level: 'error'
  },
  enableSentry: true,
  sentryConfig: {
    level: 'error',
    dsn: '{{ YOUR SENTRY DSN }}'
  }
}

logger.initAdapter({}, config);

logger.log('error', 'asdadasda');

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%