Permalink
Browse files

[refactor] Remove any remaining references to require.paths

  • Loading branch information...
1 parent 6169c96 commit 90190c10331e16a52bb732090e640422069329e8 @indexzero indexzero committed Jul 20, 2011
View
2 examples/webhook-post.js
@@ -1,4 +1,4 @@
-var winston = require('winston');
+var winston = require('../lib/winston');
//
// Create a new winston logger instance with two tranports: Console, and Webhook
View
2 lib/winston.js
@@ -24,7 +24,7 @@ winston.clone = internal.clone;
winston.longestElement = internal.longestElement;
winston.config = require('./winston/config');
winston.addColors = winston.config.addColors;
-winston.Logger = require('winston/logger').Logger;
+winston.Logger = require('./winston/logger').Logger;
//
// We create and expose a 'defaultLogger' so that the programmer may do the
View
7 lib/winston/logger.js
@@ -278,6 +278,13 @@ Logger.prototype.cli = function () {
return this;
};
+//
+// ### @private function _onError (transport, err)
+// #### @transport {Object} Transport on which the error occured
+// #### @err {Error} Error that occurred on the transport
+// Bubbles the error, `err`, that occured on the specified `transport`
+// up from this instance if `emitErrs` has been set.
+//
Logger.prototype._onError = function (transport, err) {
if (self.emitErrs) {
self.emit('error', err, transport);
View
1 package.json
@@ -13,7 +13,6 @@
},
"keywords": ["logging", "sysadmin", "tools"],
"dependencies": {
- "async": "0.1.x",
"colors": "0.x.x",
"eyes": "0.1.x",
"loggly": "0.3.x",
View
4 test/cli-test.js
@@ -6,12 +6,10 @@
*
*/
-require.paths.unshift(require('path').join(__dirname, '..', 'lib'));
-
var path = require('path'),
vows = require('vows'),
assert = require('assert'),
- winston = require('winston'),
+ winston = require('../lib/winston'),
helpers = require('./helpers');
vows.describe('winston/logger/cli').addBatch({
View
4 test/console-test.js
@@ -6,12 +6,10 @@
*
*/
-require.paths.unshift(require('path').join(__dirname, '..', 'lib'));
-
var path = require('path'),
vows = require('vows'),
assert = require('assert'),
- winston = require('winston'),
+ winston = require('../lib/winston'),
helpers = require('./helpers');
var npmTransport = new (winston.transports.Console)(),
View
4 test/file-maxsize-test.js
@@ -6,14 +6,12 @@
*
*/
-require.paths.unshift(require('path').join(__dirname, '..', 'lib'));
-
var assert = require('assert'),
exec = require('child_process').exec,
fs = require('fs'),
path = require('path'),
vows = require('vows'),
- winston = require('winston'),
+ winston = require('../lib/winston'),
helpers = require('./helpers');
var maxsizeTransport = new winston.transports.File({
View
4 test/file-test.js
@@ -6,13 +6,11 @@
*
*/
-require.paths.unshift(require('path').join(__dirname, '..', 'lib'));
-
var path = require('path'),
vows = require('vows'),
fs = require('fs'),
assert = require('assert'),
- winston = require('winston'),
+ winston = require('../lib/winston'),
helpers = require('./helpers');
var stream = fs.createWriteStream(path.join(__dirname, 'fixtures', 'testfile.log')),
View
4 test/helpers.js
@@ -6,14 +6,12 @@
*
*/
-require.paths.unshift(require('path').join(__dirname, '..', 'lib'));
-
var fs = require('fs'),
util = require('util'),
path = require('path'),
vows = require('vows'),
assert = require('assert'),
- winston = require('winston'),
+ winston = require('../lib/winston'),
loggly = require('loggly')
var helpers = exports;
View
4 test/logger-test.js
@@ -6,12 +6,10 @@
*
*/
-require.paths.unshift(require('path').join(__dirname, '..', 'lib'));
-
var path = require('path'),
vows = require('vows'),
assert = require('assert'),
- winston = require('winston'),
+ winston = require('../lib/winston'),
helpers = require('./helpers');
vows.describe('winton/logger').addBatch({
View
4 test/loggly-test.js
@@ -6,12 +6,10 @@
*
*/
-require.paths.unshift(require('path').join(__dirname, '..', 'lib'));
-
var path = require('path'),
vows = require('vows'),
assert = require('assert'),
- winston = require('winston'),
+ winston = require('../lib/winston'),
helpers = require('./helpers');
var config = helpers.loadConfig(),
View
4 test/webhook-test.js
@@ -6,14 +6,12 @@
*
*/
-require.paths.unshift(require('path').join(__dirname, '..', 'lib'));
-
var path = require('path'),
vows = require('vows'),
fs = require('fs'),
http = require('http'),
assert = require('assert'),
- winston = require('winston'),
+ winston = require('../lib/winston'),
helpers = require('./helpers');
var webhookTransport = new (winston.transports.Webhook)({
View
4 test/winston-test.js
@@ -6,14 +6,12 @@
*
*/
-require.paths.unshift(require('path').join(__dirname, '..', 'lib'));
-
var fs = require('fs'),
path = require('path'),
vows = require('vows'),
http = require('http'),
assert = require('assert'),
- winston = require('winston'),
+ winston = require('../lib/winston'),
helpers = require('./helpers');
vows.describe('winston').addBatch({

0 comments on commit 90190c1

Please sign in to comment.