Skip to content

Instantly share code, notes, and snippets.

View logger.js
var winston = require('winston')
// set default log level.
var logLevel = 'debug'
// Set up logger
var logger = winston.createLogger({
level: logLevel,
exitOnError: false,
transports: [
new (winston.transports.Console)(),
new (winston.transports.File)({ filename: 'app.log' })