129 lines
11 KiB
JSON
129 lines
11 KiB
JSON
|
{
|
||
|
"_args": [
|
||
|
[
|
||
|
{
|
||
|
"raw": "morgan@~1.6.1",
|
||
|
"scope": null,
|
||
|
"escapedName": "morgan",
|
||
|
"name": "morgan",
|
||
|
"rawSpec": "~1.6.1",
|
||
|
"spec": ">=1.6.1 <1.7.0",
|
||
|
"type": "range"
|
||
|
},
|
||
|
"/home/jdaugherty/work/GT2/GT2-Android/node_modules/connect"
|
||
|
]
|
||
|
],
|
||
|
"_from": "morgan@>=1.6.1 <1.7.0",
|
||
|
"_id": "morgan@1.6.1",
|
||
|
"_inCache": true,
|
||
|
"_location": "/morgan",
|
||
|
"_npmUser": {
|
||
|
"name": "dougwilson",
|
||
|
"email": "doug@somethingdoug.com"
|
||
|
},
|
||
|
"_npmVersion": "1.4.28",
|
||
|
"_phantomChildren": {},
|
||
|
"_requested": {
|
||
|
"raw": "morgan@~1.6.1",
|
||
|
"scope": null,
|
||
|
"escapedName": "morgan",
|
||
|
"name": "morgan",
|
||
|
"rawSpec": "~1.6.1",
|
||
|
"spec": ">=1.6.1 <1.7.0",
|
||
|
"type": "range"
|
||
|
},
|
||
|
"_requiredBy": [
|
||
|
"/connect"
|
||
|
],
|
||
|
"_resolved": "https://registry.npmjs.org/morgan/-/morgan-1.6.1.tgz",
|
||
|
"_shasum": "5fd818398c6819cba28a7cd6664f292fe1c0bbf2",
|
||
|
"_shrinkwrap": null,
|
||
|
"_spec": "morgan@~1.6.1",
|
||
|
"_where": "/home/jdaugherty/work/GT2/GT2-Android/node_modules/connect",
|
||
|
"bugs": {
|
||
|
"url": "https://github.com/expressjs/morgan/issues"
|
||
|
},
|
||
|
"contributors": [
|
||
|
{
|
||
|
"name": "Douglas Christopher Wilson",
|
||
|
"email": "doug@somethingdoug.com"
|
||
|
},
|
||
|
{
|
||
|
"name": "Jonathan Ong",
|
||
|
"email": "me@jongleberry.com",
|
||
|
"url": "http://jongleberry.com"
|
||
|
}
|
||
|
],
|
||
|
"dependencies": {
|
||
|
"basic-auth": "~1.0.3",
|
||
|
"debug": "~2.2.0",
|
||
|
"depd": "~1.0.1",
|
||
|
"on-finished": "~2.3.0",
|
||
|
"on-headers": "~1.0.0"
|
||
|
},
|
||
|
"description": "HTTP request logger middleware for node.js",
|
||
|
"devDependencies": {
|
||
|
"istanbul": "0.3.17",
|
||
|
"mocha": "2.2.5",
|
||
|
"split": "1.0.0",
|
||
|
"supertest": "1.0.1"
|
||
|
},
|
||
|
"directories": {},
|
||
|
"dist": {
|
||
|
"shasum": "5fd818398c6819cba28a7cd6664f292fe1c0bbf2",
|
||
|
"tarball": "https://registry.npmjs.org/morgan/-/morgan-1.6.1.tgz"
|
||
|
},
|
||
|
"engines": {
|
||
|
"node": ">= 0.8.0"
|
||
|
},
|
||
|
"files": [
|
||
|
"LICENSE",
|
||
|
"HISTORY.md",
|
||
|
"README.md",
|
||
|
"index.js"
|
||
|
],
|
||
|
"gitHead": "300286d1472928b10f723e8ea138533dfbd3b521",
|
||
|
"homepage": "https://github.com/expressjs/morgan#readme",
|
||
|
"license": "MIT",
|
||
|
"maintainers": [
|
||
|
{
|
||
|
"name": "jongleberry",
|
||
|
"email": "jonathanrichardong@gmail.com"
|
||
|
},
|
||
|
{
|
||
|
"name": "dougwilson",
|
||
|
"email": "doug@somethingdoug.com"
|
||
|
},
|
||
|
{
|
||
|
"name": "tjholowaychuk",
|
||
|
"email": "tj@vision-media.ca"
|
||
|
},
|
||
|
{
|
||
|
"name": "mscdex",
|
||
|
"email": "mscdex@mscdex.net"
|
||
|
},
|
||
|
{
|
||
|
"name": "fishrock123",
|
||
|
"email": "fishrock123@rocketmail.com"
|
||
|
},
|
||
|
{
|
||
|
"name": "defunctzombie",
|
||
|
"email": "shtylman@gmail.com"
|
||
|
}
|
||
|
],
|
||
|
"name": "morgan",
|
||
|
"optionalDependencies": {},
|
||
|
"readme": "# morgan\n\n[![NPM Version][npm-image]][npm-url]\n[![NPM Downloads][downloads-image]][downloads-url]\n[![Build Status][travis-image]][travis-url]\n[![Test Coverage][coveralls-image]][coveralls-url]\n[![Gratipay][gratipay-image]][gratipay-url]\n\nHTTP request logger middleware for node.js\n\n> Named after [Dexter](http://en.wikipedia.org/wiki/Dexter_Morgan), a show you should not watch until completion.\n\n## API\n\n```js\nvar morgan = require('morgan')\n```\n\n### morgan(format, options)\n\nCreate a new morgan logger middleware function using the given `format` and `options`.\nThe `format` argument may be a string of a predefined name (see below for the names),\na string of a format string, or a function that will produce a log entry.\n\n#### Options\n\nMorgan accepts these properties in the options object.\n\n#### immediate\n\nWrite log line on request instead of response. This means that a requests will\nbe logged even if the server crashes, _but data from the response (like the\nresponse code, content length, etc.) cannot be logged_.\n\n##### skip\n\nFunction to determine if logging is skipped, defaults to `false`. This function\nwill be called as `skip(req, res)`.\n\n```js\n// EXAMPLE: only log error responses\nmorgan('combined', {\n skip: function (req, res) { return res.statusCode < 400 }\n})\n```\n\n##### stream\n\nOutput stream for writing log lines, defaults to `process.stdout`.\n\n#### Predefined Formats\n\nThere are various pre-defined formats provided:\n\n##### combined\n\nStandard Apache combined log output.\n\n```\n:remote-addr - :remote-user [:date[clf]] \":method :url HTTP/:http-version\" :status :res[content-length] \":referrer\" \":user-agent\"\n```\n\n##### common\n\nStandard Apache common log output.\n\n```\n:remote-addr - :remote-user [:date[clf]] \":method :url HTTP/:http-version\" :status :res[content-length]\n```\n\n##### dev\n\nConcise output colored by response status for development use. The `:status`\ntoken will be colored red for server error codes, yellow for client error\ncodes, cyan for redirection codes, and uncolored for all other codes.\n\n```\n:method :url :status :response-time ms - :res[content-length]\n```\n\n##### short\n\nShorter than default, also including response time.\n\n```\n:remote-addr :remote-user :method :url HTTP/:http-version :status :res[content-length] - :response-time ms\n```\n\n##### tiny\n\nThe minimal output.\n\n```\n:method :url :status :res[content-length] - :response-time ms\n```\n\n#### Tokens\n\n##### Creating new tokens\n\nTo define a token, simply invoke `morgan.token()` with the name and a callback function. This callback function is expected to return a string value. The value returned is then available as \":type\" in this case:\n```js\nmorgan.token('type', function(req, res){ return req.headers['content-type']; })\n```\n\nCalling `morgan.token()` using the same name as an existing token will overwrite that token definition.\n\n##### :date[format]\n\nThe current date and time in UTC. The available formats are:\n\n - `clf` for the common log format (`\"10/Oct/2000:13:55:36 +0000\"`)\n - `iso` for the common ISO 8601 date time format (`2000-10-10T13:55:36.000Z`)\n - `web` for the common RFC 1123 date time format (`Tue, 10 Oct 2000 13:55:36 GMT`)\n\nIf no format is given, then the default is `web`.\n\n##### :http-version\n\nThe HTTP version of the request.\n\n##### :method\n\nThe HTTP version of the request.\n\n##### :referrer\n\nThe Referrer header of the request. This will use the standard mis-spelled Referer header if exists, otherwise Referrer.\n\n##### :remote-addr\n\nThe remote address of the request. This will use `req.ip`, otherwise the standard `req.connection.remoteAddress` value (socket address).\n\n##### :remote-user\n\nThe user authenticated as part of Basic auth for the request.\n\n##### :req[header]\n\nThe given `header` of the request.\n\n##### :res[header]\n\nThe given `header` of the response.\n\n##### :response-time\n\nThe time between the request coming into `morgan` and when the response headers are written, in millis
|
||
|
"readmeFilename": "README.md",
|
||
|
"repository": {
|
||
|
"type": "git",
|
||
|
"url": "git+https://github.com/expressjs/morgan.git"
|
||
|
},
|
||
|
"scripts": {
|
||
|
"test": "mocha --check-leaks --reporter spec --bail",
|
||
|
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --reporter dot",
|
||
|
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --check-leaks --reporter spec"
|
||
|
},
|
||
|
"version": "1.6.1"
|
||
|
}
|