Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /home/picotech/domains/note.picotech.app/public_html/node_modules/winston/lib/winston/ drwxr-xr-x | |
| Viewing file: Select action/file-type: /**
* 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;
}
};
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0044 ]-- |