UNPKG

winston

Version:

A multi-transport async logging library for Node.js

30 lines (26 loc) 603 B
/* * transports.js: Set of all transports Winston knows about * * (C) 2010 Charlie Robbins * MIT LICENCE * */ var path = require('path'); // // Setup all transports as lazy-loaded getters. // Object.defineProperties( exports, ['Console', 'File', 'Http', 'Memory'] .reduce(function (acc, name) { acc[name] = { configurable: true, enumerable: true, get: function () { var fullpath = path.join(__dirname, 'transports', name.toLowerCase()); return exports[name] = require(fullpath)[name]; } }; return acc; }, {}) );