Skip to content

An extension of the morgan express logger to output through the debug library.

Notifications You must be signed in to change notification settings

Twipped/morgan-debug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

morgan-debug

Morgan-debug is an express middleware which composes the morgan logger middleware with the debug console output library for a consistent logging output with other library debug info.

npm install morgan debug morgan-debug

Note that morgan and debug are both peer dependencies and must be installed separately.

Usage

morganDebug(namespace, format, [options]);

  • namespace (string): The debug namespace or a debug function
  • format (string): The morgan format string
  • options (object): Optional options to pass through to morgan
var express     = require('express');
var morganDebug = require('morgan-debug');

var app = express();
app.use(morganDebug('myapp', 'combined'));

See the respective libraries for details of their operation and options.

About

An extension of the morgan express logger to output through the debug library.

Resources

Stars

Watchers

Forks

Packages

No packages published