/var/www/myprog.com.ua/server/node/node_modules/winston/lib/winston
NameSizeModeActions
config/-0755rm
transports/-0755rm
common.js10160644editdlrm
container.js33610644editdlrm
create-logger.js31400644editdlrm
exception-handler.js69090644editdlrm
exception-stream.js15060644editdlrm
logger.js196640644editdlrm
profiler.js14190644editdlrm
rejection-handler.js69820644editdlrm
rejection-stream.js13530644editdlrm
tail-file.js27000644editdlrm
Edit: /var/www/myprog.com.ua/server/node/node_modules/winston/lib/winston/exception-stream.js (1506B)
/** * exception-stream.js: TODO: add file header handler. * * (C) 2010 Charlie Robbins * MIT LICENCE */ 'use strict'; const { Writable } = require('readable-stream'); /** * TODO: add class description. * @type {ExceptionStream} * @extends {Writable} */ module.exports = class ExceptionStream extends Writable { /** * Constructor function for the ExceptionStream responsible for wrapping a * TransportStream; only allowing writes of `info` objects with * `info.exception` set to true. * @param {!TransportStream} transport - Stream to filter to exceptions */ constructor(transport) { super({ objectMode: true }); if (!transport) { throw new Error('ExceptionStream requires a TransportStream instance.'); } // Remark (indexzero): we set `handleExceptions` here because it's the // predicate checked in ExceptionHandler.prototype.__getExceptionHandlers this.handleExceptions = true; this.transport = transport; } /** * Writes the info object to our transport instance if (and only if) the * `exception` property is set on the info. * @param {mixed} info - TODO: add param description. * @param {mixed} enc - TODO: add param description. * @param {mixed} callback - TODO: add param description. * @returns {mixed} - TODO: add return description. * @private */ _write(info, enc, callback) { if (info.exception) { return this.transport.log(info, callback); } callback(); return true; } };