mirror of
https://github.com/seejohnrun/haste-server.git
synced 2026-01-11 05:39:14 +00:00
Added node modules
This commit is contained in:
26
node_modules/winston/test/fixtures/scripts/unhandle-exceptions.js
generated
vendored
Normal file
26
node_modules/winston/test/fixtures/scripts/unhandle-exceptions.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* unhandle-exceptions.js: A test fixture for using `.unhandleExceptions()` winston.
|
||||
*
|
||||
* (C) 2011 Charlie Robbins
|
||||
* MIT LICENCE
|
||||
*
|
||||
*/
|
||||
|
||||
var path = require('path'),
|
||||
winston = require('../../../lib/winston');
|
||||
|
||||
var logger = new (winston.Logger)({
|
||||
transports: [
|
||||
new (winston.transports.File)({
|
||||
filename: path.join(__dirname, '..', 'logs', 'unhandle-exception.log'),
|
||||
handleExceptions: true
|
||||
})
|
||||
]
|
||||
});
|
||||
|
||||
logger.handleExceptions();
|
||||
logger.unhandleExceptions();
|
||||
|
||||
setTimeout(function () {
|
||||
throw new Error('OH NOES! It failed!');
|
||||
}, 1000);
|
||||
Reference in New Issue
Block a user