How to use the morgan.combined function in morgan

To help you get started, we’ve selected a few morgan examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ifgyong / demo / React-native / Helloword / node_modules / connect / lib / middleware / logger.js View on Github external
/**
 * Module dependencies.
 */

var morgan = require('morgan');
var merge = require('utils-merge');

/**
 * Undeprecate default format.
 */

Object.defineProperty(morgan, 'default', {
    configurable: true,
    enumerable: true,
    value: morgan.combined
});

/**
 * Logger:
 *
 * Log requests with the given `options` or a `format` string.
 *
 * See [morgan](https://github.com/expressjs/morgan)
 *
 * @param {String|Function|Object} format or options
 * @return {Function}
 * @api public
 */

module.exports = function logger(options) {
    var format = 'default';
github pa11y / sidekick / lib / dashboard.js View on Github external
return app;
	}

}

/**
 * The default options used when constructing a dashboard.
 * @static
 */
Dashboard.defaults = {
	dashboardUrl: null,
	databaseConnectionString: 'postgres://localhost:5432/pa11y_sidekick',
	environment: 'development',
	log: console,
	port: 8080,
	requestLogFormat: `${morgan.combined} authUser=":auth[user]" authKey=":auth[key]"`,
	sessionSecret: null
};

module.exports = Dashboard;
github senchalabs / connect / lib / middleware / logger.js View on Github external
/**
 * Module dependencies.
 */

var morgan = require('morgan');
var merge = require('utils-merge');

/**
 * Undeprecate default format.
 */

Object.defineProperty(morgan, 'default', {
  configurable: true,
  enumerable: true,
  value: morgan.combined
});

/**
 * Logger:
 *
 * Log requests with the given `options` or a `format` string.
 *
 * See [morgan](https://github.com/expressjs/morgan)
 *
 * @param {String|Function|Object} format or options
 * @return {Function}
 * @api public
 */

module.exports = function logger(options) {
  var format = 'default';
github 1PhoenixM / avior-service / node_modules / sails / node_modules / skipper / node_modules / connect / lib / middleware / logger.js View on Github external
/**
 * Module dependencies.
 */

var morgan = require('morgan');
var utils = require('../utils');

/**
 * Undeprecate default format.
 */

Object.defineProperty(morgan, 'default', {
  configurable: true,
  enumerable: true,
  value: morgan.combined
});

/**
 * Logger:
 *
 * Log requests with the given `options` or a `format` string.
 *
 * See [morgan](https://github.com/expressjs/morgan)
 *
 * @param {String|Function|Object} format or options
 * @return {Function}
 * @api public
 */

module.exports = function logger(options) {
  var opts = utils.merge({

morgan

HTTP request logger middleware for node.js

MIT
Latest version published 4 years ago

Package Health Score

81 / 100
Full package analysis