Comparing version 1.3.2 to 1.4.0
@@ -0,1 +1,7 @@ | ||
1.4.0 / 2014-10-16 | ||
================== | ||
* Add `debug` messages | ||
* deps: depd@~1.0.0 | ||
1.3.2 / 2014-09-27 | ||
@@ -2,0 +8,0 @@ ================== |
33
index.js
@@ -12,5 +12,7 @@ /*! | ||
* Module dependencies. | ||
* @private | ||
*/ | ||
var auth = require('basic-auth') | ||
var debug = require('debug')('morgan') | ||
var deprecate = require('depd')('morgan') | ||
@@ -21,2 +23,3 @@ var onFinished = require('on-finished') | ||
* Default log buffer duration. | ||
* @private | ||
*/ | ||
@@ -29,6 +32,6 @@ | ||
* | ||
* @public | ||
* @param {String|Function} format | ||
* @param {Object} [options] | ||
* @return {Function} middleware | ||
* @api public | ||
*/ | ||
@@ -101,6 +104,16 @@ | ||
function logRequest(){ | ||
if (skip(req, res)) return; | ||
var line = fmt(exports, req, res); | ||
if (null == line) return; | ||
stream.write(line + '\n'); | ||
if (skip(req, res)) { | ||
debug('skip request') | ||
return | ||
} | ||
var line = fmt(exports, req, res) | ||
if (null == line) { | ||
debug('skip line') | ||
return | ||
} | ||
debug('log request') | ||
stream.write(line + '\n') | ||
}; | ||
@@ -122,5 +135,5 @@ | ||
* | ||
* @private | ||
* @param {Function|String} format | ||
* @return {Function} | ||
* @api private | ||
*/ | ||
@@ -150,6 +163,6 @@ | ||
* | ||
* @public | ||
* @param {String} name | ||
* @param {Function} fn | ||
* @return {Object} exports for chaining | ||
* @api public | ||
*/ | ||
@@ -165,6 +178,6 @@ | ||
* | ||
* @public | ||
* @param {String} name | ||
* @param {String|Function} fmt | ||
* @return {Object} exports for chaining | ||
* @api public | ||
*/ | ||
@@ -326,2 +339,6 @@ | ||
* Get request IP address. | ||
* | ||
* @private | ||
* @param {IncomingMessage} req | ||
* @return {string} | ||
*/ | ||
@@ -328,0 +345,0 @@ |
{ | ||
"name": "morgan", | ||
"description": "http request logger middleware for node.js", | ||
"version": "1.3.2", | ||
"version": "1.4.0", | ||
"author": "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)", | ||
@@ -13,3 +13,4 @@ "contributors": [ | ||
"basic-auth": "1.0.0", | ||
"depd": "0.4.5", | ||
"debug": "~2.1.0", | ||
"depd": "~1.0.0", | ||
"on-finished": "2.1.0" | ||
@@ -19,5 +20,5 @@ }, | ||
"istanbul": "0.3.2", | ||
"mocha": "~1.21.0", | ||
"mocha": "~1.21.5", | ||
"should": "~4.0.4", | ||
"supertest": "~0.13.0" | ||
"supertest": "~0.14.0" | ||
}, | ||
@@ -24,0 +25,0 @@ "files": [ |
@@ -197,5 +197,5 @@ # morgan | ||
[coveralls-url]: https://coveralls.io/r/expressjs/morgan?branch=master | ||
[downloads-image]: http://img.shields.io/npm/dm/morgan.svg?style=flat | ||
[downloads-image]: https://img.shields.io/npm/dm/morgan.svg?style=flat | ||
[downloads-url]: https://npmjs.org/package/morgan | ||
[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg?style=flat | ||
[gratipay-url]: https://www.gratipay.com/dougwilson/ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15666
268
4
+ Addeddebug@~2.1.0
+ Addeddebug@2.1.3(transitive)
+ Addeddepd@1.0.1(transitive)
+ Addedms@0.7.0(transitive)
- Removeddepd@0.4.5(transitive)
Updateddepd@~1.0.0