An extensible Java library for complete HTTP request and response logging across various client and server technologies.
Logbook is an extensible Java library that enables complete HTTP request and response logging for different client- and server-side technologies. It allows developers to log any HTTP traffic an application receives or sends in a way that facilitates persistence and analysis for log analysis, audit compliance, or traffic investigation.
Java developers building web applications or HTTP-based services who need detailed, customizable logging of HTTP traffic for debugging, monitoring, or compliance purposes.
Developers choose Logbook for its extensibility, wide framework support (Servlet, Spring, Apache HTTP Client, OkHttp, etc.), and powerful filtering and formatting options that go beyond basic logging to handle sensitive data and production needs.
An extensible Java library for HTTP request and response logging
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Logs both requests and responses including bodies, with partial logging for unauthorized requests, enabling detailed audit trails and debugging as per the Features section.
Supports a wide range of Java frameworks like Servlet, Apache HTTP Client, OkHttp, JAX-RS, Netty, Ktor, and Spring via modular integrations, making it highly versatile.
Provides built-in filters to obfuscate sensitive data in headers, query parameters, and JSON fields, with customizable rules for compliance, including experimental JsonPath filtering.
Offers various formats such as JSON, HTTP, cURL, Splunk, CLF, and ELF, allowing logs to be tailored for machine readability or human consumption in different environments.
Includes a Spring Boot starter for zero-configuration setup with sensible defaults, simplifying integration and reducing boilerplate code for Spring applications.
Interferes with downstream code using getWriter and getParameter*() methods and does not support ERROR dispatch, as highlighted in the Known Issues, which can break existing functionality.
Requires Java 17 or higher, which may exclude legacy projects or teams stuck on older Java versions, limiting adoption in certain environments.
Manual setup for non-Spring frameworks involves detailed builder patterns and multiple dependencies, increasing initial effort despite the extensibility praised in the README.
Logging all HTTP traffic, especially with body content, can introduce significant latency and resource consumption, necessitating careful strategy selection to mitigate impact.