awesome-repositories.com
博客
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目关于排名机制媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
expressjs avatar

expressjs/morgan

0
View on GitHub↗
8,182 星标·554 分支·JavaScript·MIT·8 次浏览

Morgan

Morgan 是一个 Node.js HTTP 日志中间件,旨在记录传入请求和传出响应。它捕获请求元数据和计时,以促进 API 请求审计和服务器性能监控。

该项目利用基于令牌的字符串插值和自定义日志令牌从 HTTP 对象中提取特定属性。它支持通过将格式化的日志字符串路由到各种可写流来实现多目标日志记录,并采用日志输出清理来转义控制字符。

其他功能包括基于谓词的日志过滤(以有条件地省略条目)以及在收到请求时触发即时日志计时的能力。

Features

  • HTTP Traffic Logging - Provides a dedicated middleware for recording incoming and outgoing HTTP traffic in Node.js applications.
  • Token-Based Interpolation - Uses named tokens and extractor functions to dynamically build log strings from HTTP request and response metadata.
  • Request Middleware - Provides middleware to intercept the Node.js request-response cycle for metadata and timing capture.
  • Application API Auditing - Captures detailed HTTP metadata to create an audit trail of all API interactions.
  • Request Logging - Records details of incoming and outgoing HTTP traffic for diagnostic and monitoring purposes.
  • Web Server Performance Monitoring - Tracks response times and status codes to identify slow endpoints and frequent server errors.
  • Log Token Extractors - Provides custom tokens that extract specific metadata from requests and responses to inject into log entries.
  • Log String Sanitizers - Sanitizes log output by escaping control characters to prevent log injection attacks.
  • Character Escaping - Escapes non-printable control characters in request data to prevent log injection attacks.
  • Log Entry Filters - Allows conditionally omitting log entries based on custom boolean predicate functions.
  • Writable Stream Integration - Routes formatted log messages to any Node.js writable stream, including the console and file system.
  • Log Event Filters - Prevents specific requests from being logged based on custom conditions, such as HTTP status codes.
  • Application Log Redirection - Manages application logs by routing HTTP request data to various output destinations and filtering noise.
  • Application Log Routing - Directs log entries to specific writable streams like the console or rotating files.
  • Request Timing Logs - Supports immediate log writing upon request receipt to capture timing without waiting for the response.
  • Database and Backend - HTTP request logger middleware for Node.js applications.
  • Loggers, Errors & Reporting - Listed in the “Loggers, Errors & Reporting” section of the Awesome Micro awesome list.

Star 历史

expressjs/morgan 的 Star 历史图表expressjs/morgan 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

Morgan 的开源替代方案

相似的开源项目,按与 Morgan 的功能重合度排序。
  • qos-ch/logbackqos-ch 的头像

    qos-ch/logback

    3,211在 GitHub 上查看↗

    Logback is a Java logging framework used to record system events and diagnostic messages through a programmable API. It serves as a concrete implementation of the Simple Logging Facade for Java (SLF4J) and provides a structured logging engine for outputting events in machine-readable formats like JSON. The system distinguishes itself through an asynchronous log processor that utilizes circular queues and background workers to reduce performance overhead. It also features a log file rotation manager for size-based or time-based rollover with automatic compression, and the ability to update log

    Java
    在 GitHub 上查看↗3,211
  • revel/revelrevel 的头像

    revel/revel

    13,224在 GitHub 上查看↗

    Revel is a full-stack web framework and toolkit for building applications with the Go language. It implements a model-view-controller architecture to separate business logic from user interface rendering, providing a comprehensive system for routing, parameter binding, and session management. The project distinguishes itself with a high-productivity development environment featuring automatic code compilation and hot-reloading, which refreshes the application state and templates upon file changes without requiring manual restarts. It also employs reflection-based parameter binding to automati

    Go
    在 GitHub 上查看↗13,224
  • luraproject/luraluraproject 的头像

    luraproject/lura

    6,780在 GitHub 上查看↗

    Lura is an API gateway and traffic router that directs network requests to backend services using a configurable pipeline of processing steps. It functions as a backend load balancer and a request middleware engine designed to validate, modify, and transform incoming requests and responses. The system specializes in API response aggregation, allowing it to execute concurrent requests to multiple backend services and merge the results into a single unified output. This includes the ability to perform dynamic response mapping by renaming fields and filtering data to optimize the final client pa

    Goapi-gatewayapisbackend-services
    在 GitHub 上查看↗6,780
  • gofiber/recipesgofiber 的头像

    gofiber/recipes

    3,427在 GitHub 上查看↗

    This project is a comprehensive library of reference implementations and patterns for building web applications using the Go Fiber framework. It provides curated templates and implementation guides for creating REST APIs, web servers, and structured backend services. The repository serves as a practical resource for applying architectural patterns, including Clean and Hexagonal architectures, as well as port-and-adapter decoupling. It offers detailed examples for integrating common web features such as OAuth2 authentication, JWT verification, WebSockets for real-time communication, and server

    Gocookbookexamplesfiber
    在 GitHub 上查看↗3,427
查看 Morgan 的所有 30 个替代方案→

常见问题解答

expressjs/morgan 是做什么的?

Morgan 是一个 Node.js HTTP 日志中间件,旨在记录传入请求和传出响应。它捕获请求元数据和计时,以促进 API 请求审计和服务器性能监控。

expressjs/morgan 的主要功能有哪些?

expressjs/morgan 的主要功能包括:HTTP Traffic Logging, Token-Based Interpolation, Request Middleware, Application API Auditing, Request Logging, Web Server Performance Monitoring, Log Token Extractors, Log String Sanitizers。

expressjs/morgan 有哪些开源替代品?

expressjs/morgan 的开源替代品包括: qos-ch/logback — Logback is a Java logging framework used to record system events and diagnostic messages through a programmable API.… revel/revel — Revel is a full-stack web framework and toolkit for building applications with the Go language. It implements a… luraproject/lura — Lura is an API gateway and traffic router that directs network requests to backend services using a configurable… gofiber/recipes — This project is a comprehensive library of reference implementations and patterns for building web applications using… serilog/serilog — Serilog is a structured logging library for .NET applications that records events as rich data objects instead of… unjs/consola — Consola is a diagnostic logging utility and log output manager that provides a unified interface for Node.js and web…