diff options
author | isaacs <i@izs.me> | 2013-06-21 00:53:32 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-06-21 00:53:32 +0400 |
commit | 41353f852c161948b212b140614b717517a6f7a4 (patch) | |
tree | a6cbce50cbd9873f056ad106840ad0bb5b22fda6 /node_modules/npmlog | |
parent | 12369965d9f730a37878e26eb308842f24c5f2d6 (diff) |
npmlog@0.0.3
Diffstat (limited to 'node_modules/npmlog')
-rw-r--r-- | node_modules/npmlog/LICENSE | 22 | ||||
-rw-r--r-- | node_modules/npmlog/log.js | 4 | ||||
-rw-r--r-- | node_modules/npmlog/package.json | 24 |
3 files changed, 21 insertions, 29 deletions
diff --git a/node_modules/npmlog/LICENSE b/node_modules/npmlog/LICENSE index 74489e2e2..0c44ae716 100644 --- a/node_modules/npmlog/LICENSE +++ b/node_modules/npmlog/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) Isaac Z. Schlueter +Copyright (c) Isaac Z. Schlueter ("Author") All rights reserved. The BSD License @@ -6,20 +6,22 @@ The BSD License Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/npmlog/log.js b/node_modules/npmlog/log.js index 320788e7a..752b81eb0 100644 --- a/node_modules/npmlog/log.js +++ b/node_modules/npmlog/log.js @@ -81,7 +81,7 @@ log.log = function (lvl, prefix, message) { } this.emitLog(m) -} +}.bind(log) log.emitLog = function (m) { if (this._paused) { @@ -135,7 +135,7 @@ log.addLevel = function (lvl, n, style, disp) { a[i + 1] = arguments[i] } return this.log.apply(this, a) - } + }.bind(this) this.disp[lvl] = disp } diff --git a/node_modules/npmlog/package.json b/node_modules/npmlog/package.json index d9a33c451..e4e6cf1fa 100644 --- a/node_modules/npmlog/package.json +++ b/node_modules/npmlog/package.json @@ -6,7 +6,7 @@ }, "name": "npmlog", "description": "logger for npm", - "version": "0.0.2", + "version": "0.0.3", "repository": { "type": "git", "url": "git://github.com/isaacs/npmlog.git" @@ -22,21 +22,11 @@ "tap": "" }, "license": "BSD", - "_npmUser": { - "name": "isaacs", - "email": "i@izs.me" + "readme": "# npmlog\n\nThe logger util that npm uses.\n\nThis logger is very basic. It does the logging for npm. It supports\ncustom levels and colored output.\n\nBy default, logs are written to stderr. If you want to send log messages\nto outputs other than streams, then you can change the `log.stream`\nmember, or you can just listen to the events that it emits, and do\nwhatever you want with them.\n\n# Basic Usage\n\n```\nvar log = require('npmlog')\n\n// additional stuff ---------------------------+\n// message ----------+ |\n// prefix ----+ | |\n// level -+ | | |\n// v v v v\n log.info('fyi', 'I have a kitty cat: %j', myKittyCat)\n```\n\n## log.level\n\n* {String}\n\nThe level to display logs at. Any logs at or above this level will be\ndisplayed. The special level `silent` will prevent anything from being\ndisplayed ever.\n\n## log.record\n\n* {Array}\n\nAn array of all the log messages that have been entered.\n\n## log.maxRecordSize\n\n* {Number}\n\nThe maximum number of records to keep. If log.record gets bigger than\n10% over this value, then it is sliced down to 90% of this value.\n\nThe reason for the 10% window is so that it doesn't have to resize a\nlarge array on every log entry.\n\n## log.prefixStyle\n\n* {Object}\n\nA style object that specifies how prefixes are styled. (See below)\n\n## log.headingStyle\n\n* {Object}\n\nA style object that specifies how the heading is styled. (See below)\n\n## log.heading\n\n* {String} Default: \"\"\n\nIf set, a heading that is printed at the start of every line.\n\n## log.stream\n\n* {Stream} Default: `process.stderr`\n\nThe stream where output is written.\n\n## log.enableColor()\n\nForce colors to be used on all messages, regardless of the output\nstream.\n\n## log.disableColor()\n\nDisable colors on all messages.\n\n## log.pause()\n\nStop emitting messages to the stream, but do not drop them.\n\n## log.resume()\n\nEmit all buffered messages that were written while paused.\n\n## log.log(level, prefix, message, ...)\n\n* `level` {String} The level to emit the message at\n* `prefix` {String} A string prefix. Set to \"\" to skip.\n* `message...` Arguments to `util.format`\n\nEmit a log message at the specified level.\n\n## log\\[level](prefix, message, ...)\n\nFor example,\n\n* log.silly(prefix, message, ...)\n* log.verbose(prefix, message, ...)\n* log.info(prefix, message, ...)\n* log.http(prefix, message, ...)\n* log.warn(prefix, message, ...)\n* log.error(prefix, message, ...)\n\nLike `log.log(level, prefix, message, ...)`. In this way, each level is\ngiven a shorthand, so you can do `log.info(prefix, message)`.\n\n## log.addLevel(level, n, style, disp)\n\n* `level` {String} Level indicator\n* `n` {Number} The numeric level\n* `style` {Object} Object with fg, bg, inverse, etc.\n* `disp` {String} Optional replacement for `level` in the output.\n\nSets up a new level with a shorthand function and so forth.\n\nNote that if the number is `Infinity`, then setting the level to that\nwill cause all log messages to be suppressed. If the number is\n`-Infinity`, then the only way to show it is to enable all log messages.\n\n# Events\n\nEvents are all emitted with the message object.\n\n* `log` Emitted for all messages\n* `log.<level>` Emitted for all messages with the `<level>` level.\n* `<prefix>` Messages with prefixes also emit their prefix as an event.\n\n# Style Objects\n\nStyle objects can have the following fields:\n\n* `fg` {String} Color for the foreground text\n* `bg` {String} Color for the background\n* `bold`, `inverse`, `underline` {Boolean} Set the associated property\n* `bell` {Boolean} Make a noise (This is pretty annoying, probably.)\n\n# Message Objects\n\nEvery log event is emitted with a message object, and the `log.record`\nlist contains all of them that have been created. They have the\nfollowing fields:\n\n* `id` {Number}\n* `level` {String}\n* `prefix` {String}\n* `message` {String} Result of `util.format()`\n* `messageRaw` {Array} Arguments to `util.format()`\n", + "readmeFilename": "README.md", + "bugs": { + "url": "https://github.com/isaacs/npmlog/issues" }, - "_id": "npmlog@0.0.2", - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "_engineSupported": true, - "_npmVersion": "1.1.24", - "_nodeVersion": "v0.7.10-pre", - "_defaultsLoaded": true, - "dist": { - "shasum": "f0cf4b2c519950c00e91ba8e2868b62bf86254f6" - }, - "_from": "npmlog@0" + "_id": "npmlog@0.0.3", + "_from": "npmlog@latest" } |