Merge pull request #341 from spalger/backport/changesFrom/jmm

Backport changes from jmm
This commit is contained in:
Spencer
2016-01-15 12:15:19 -07:00
3 changed files with 10 additions and 11 deletions

View File

@ -11,9 +11,6 @@
`query`:: `query`::
`Object` -- The query string params `Object` -- The query string params
`path`::
`Object` -- The query string params
`ignore`:: `ignore`::
`Number, Number[]` -- HTTP status codes which should not be treated as errors `Number, Number[]` -- HTTP status codes which should not be treated as errors

9
src/lib/log.js Executable file → Normal file
View File

@ -10,11 +10,12 @@ var EventEmitter = require('events').EventEmitter;
* @class Log * @class Log
* @uses Loggers.Stdio * @uses Loggers.Stdio
* @constructor * @constructor
* @param {string|Object|ArrayOfStrings|ArrayOfObjects} output - Either the level * @param {object} config
* @param {string|Object|ArrayOfStrings|ArrayOfObjects} config.log - Either the level
* to setup a single logger, a full config object for a logger, or an array of * to setup a single logger, a full config object for a logger, or an array of
* config objects to use for creating log outputs. * config objects to use for creating log outputs.
* @param {string} output.level - One of the keys in Log.levels (error, warning, etc.) * @param {string|array} config.log.level|config.log.levels - One or more keys in Log.levels (error, warning, etc.)
* @param {string} output.type - The name of the logger to use for this output * @param {string} config.log.type - The name of the logger to use for this output
*/ */
function Log(config) { function Log(config) {
config = config || {}; config = config || {};
@ -196,7 +197,7 @@ Log.join = function (arrayish) {
* @param {object} config - An object with config options for the logger. * @param {object} config - An object with config options for the logger.
* @param {String} [config.type=stdio] - The name of an output/logger. Options * @param {String} [config.type=stdio] - The name of an output/logger. Options
* can be found in the `src/loggers` directory. * can be found in the `src/loggers` directory.
* @param {String|ArrayOfStrings} [config.levels=warning] - The levels to output * @param {String|ArrayOfStrings} [config.level|config.levels=warning] - The levels to output
* to this logger, when an array is specified no levels other than the ones * to this logger, when an array is specified no levels other than the ones
* specified will be listened to. When a string is specified, that and all lower * specified will be listened to. When a string is specified, that and all lower
* levels will be logged. * levels will be logged.

View File

@ -122,9 +122,10 @@ Transport.prototype.defer = function () {
* @todo access to custom headers, modifying of request in general * @todo access to custom headers, modifying of request in general
* @param {object} params * @param {object} params
* @param {Number} params.requestTimeout - timeout for the entire request (inculding all retries) * @param {Number} params.requestTimeout - timeout for the entire request (inculding all retries)
* @param {Number} params.maxRetries - number of times the request will be re-run in * @param {Number} params.maxRetries - number of times to re-run request if the
* the original node chosen can not be connected to. * original node chosen can not be connected to.
* @param {String} params.url - The url for the request * @param {string} [params.path="/"] - URL pathname. Do not include query string.
* @param {string|object} [params.query] - Query string.
* @param {String} params.method - The HTTP method for the request * @param {String} params.method - The HTTP method for the request
* @param {String} params.body - The body of the HTTP request * @param {String} params.body - The body of the HTTP request
* @param {Function} cb - A function to call back with (error, responseBody, responseStatus) * @param {Function} cb - A function to call back with (error, responseBody, responseStatus)