# morgan-debug

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

Latest version **2.0.0** (published 2016-10-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install morgan-debug
pnpm add morgan-debug
yarn add morgan-debug
bun add morgan-debug
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2016-10-10 |
| First published | 2014-08-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Author | Jarvis Badgley |
| Maintainers | chipersoft |
| Keywords | express, logger, debug, morgan |

## Links

- npm: https://www.npmjs.com/package/morgan-debug
- Repository: https://github.com/ChiperSoft/morgan-debug
- Issues: https://github.com/ChiperSoft/morgan-debug/issues
- npm.io page: https://npm.io/package/morgan-debug

## Dependencies (1)

- [through2](https://npm.io/package/through2.md) ~2.0.1

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 2.0.0 (latest) — 2016-10-10
- 1.1.0 — 2016-10-10
- 1.0.0 — 2015-04-01
- 0.1.1 — 2014-08-07
- 0.1.0 — 2014-08-07

## README

morgan-debug
===

Morgan-debug is an express middleware which composes the [`morgan`](https://www.npmjs.org/package/morgan) logger middleware with the [`debug`](https://www.npmjs.org/package/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

```js
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.

---
_Source: https://npm.io/package/morgan-debug · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
