# expressjs/morgan

HTTP request logger middleware for node.js

Repository: https://github.com/expressjs/morgan
Canonical: https://ross.abutalabs.com/products/morgan
Language: JavaScript
License: MIT
License Family: permissive
Topics: nodejs, javascript, express, logger
Last push: 2026-08-26T16:16:29+00:00

## Health v2 (maintenance only)
Score: 83/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 54, longevity 100
- inputs: {"age_days": 4589, "days_push": 7, "days_rel": 92, "gap_med": 320, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 8201, forks 562 (observed 2026-08-28T04:10:19.559494+00:00)

## What it is
Morgan is HTTP request logger middleware for Node.js, commonly used with Express. It supports predefined and custom log formats, configurable output streams, and request/response filtering options.

## Use cases
- log http requests in express
- access log middleware for node.js
- log only error responses
- custom http log format
- write request logs to a file
- structured logging of http requests

## When to choose
- you use Express or Connect and need request logging middleware
- you want simple, configurable access logs with predefined formats like combined or tiny
- you need to route logs to a custom stream or structured logger

## When to avoid
- you need a full application-level logging library with levels and transports (use winston or pino)
- you are not running a Node.js HTTP server
- you need distributed tracing rather than request logs

## Facets
- artifact type: library
- maturity: stable
- function: logging, middleware, http-server
- domain: web-development, backend, developer-tools, monitoring
- platform: -
- tags: express, http-request-logging, access-logs, npm, nodejs, web-server

## Member repositories
- expressjs/morgan (main) score 83

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:19.559494+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:29:33.524498+00:00, confidence not recorded.
  - readme: https://github.com/expressjs/morgan (fetched 2026-08-28T04:10:19.559494+00:00, sha 4f20fec6ba34)
  - registry_npm: https://registry.npmjs.org/morgan (fetched 2026-08-29T08:28:28.142522+00:00, sha d2e28108a1d7)
- Data as of 2026-08-30T08:39:29.467469+00:00.
