Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Java
  3. Logbook

Logbook

MITJava4.0.4

An extensible Java library for complete HTTP request and response logging across various client and server technologies.

GitHubGitHub
2.1k stars284 forks0 contributors

What is Logbook?

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.

Target Audience

Java developers building web applications or HTTP-based services who need detailed, customizable logging of HTTP traffic for debugging, monitoring, or compliance purposes.

Value Proposition

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.

Overview

An extensible Java library for HTTP request and response logging

Use Cases

Best For

  • Adding detailed HTTP traffic logging to Spring Boot applications
  • Logging HTTP requests and responses in microservices for audit trails
  • Debugging HTTP client interactions in Java applications
  • Obfuscating sensitive data (like tokens or passwords) in HTTP logs
  • Integrating HTTP logging with structured logging systems like Logstash
  • Customizing log output format (JSON, cURL, CLF) for different environments

Not Ideal For

  • Applications running on Java versions below 17, as Logbook mandates Java 17 or higher for compatibility with modern frameworks like Spring Boot 4.
  • Projects where HTTP logging is delegated to infrastructure layers like API gateways or service meshes, making application-level logging redundant.
  • Teams seeking plug-and-play logging with zero code changes; Logbook requires integration via filters or interceptors, even with Spring Boot auto-configuration.
  • Servlet-based applications that extensively use getParameter*() methods, due to known interference issues with Logbook's filter as noted in the Known Issues section.

Pros & Cons

Pros

Complete HTTP Logging

Logs both requests and responses including bodies, with partial logging for unauthorized requests, enabling detailed audit trails and debugging as per the Features section.

Extensible Framework Support

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.

Advanced Data Obfuscation

Provides built-in filters to obfuscate sensitive data in headers, query parameters, and JSON fields, with customizable rules for compliance, including experimental JsonPath filtering.

Multiple Output Formats

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.

Spring Boot Auto-Configuration

Includes a Spring Boot starter for zero-configuration setup with sensible defaults, simplifying integration and reducing boilerplate code for Spring applications.

Cons

Servlet Filter Limitations

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.

Java Version Constraint

Requires Java 17 or higher, which may exclude legacy projects or teams stuck on older Java versions, limiting adoption in certain environments.

Configuration Complexity

Manual setup for non-Spring frameworks involves detailed builder patterns and multiple dependencies, increasing initial effort despite the extensibility praised in the README.

Performance Overhead

Logging all HTTP traffic, especially with body content, can introduce significant latency and resource consumption, necessitating careful strategy selection to mitigate impact.

Frequently Asked Questions

Quick Stats

Stars2,052
Forks284
Contributors0
Open Issues20
Last commit1 day ago
CreatedSince 2015

Tags

#jax-rs#server-side#logs#okhttp#netty#servlet#plugin-extension#java#ktor#spring-boot-starter#monitoring#logging#logger#client-side#spring-boot#request-response#http-logging

Built With

J
Java

Included in

Java47.5k
Auto-fetched 16 hours ago

Related Projects

p6spyp6spy

P6Spy is a framework that enables database data to be seamlessly intercepted and logged with no code changes to the application.

Stars2,230
Forks330
Last commit4 years ago
OpenTracing ToolboxOpenTracing Toolbox

Best-of-breed OpenTracing utilities, instrumentations and extensions

Stars180
Forks46
Last commit1 year ago
EchopraxiaEchopraxia

Java Structured Logging API for Logback, Log4J2, and JUL

Stars59
Forks2
Last commit1 year ago
KibanaKibana

Analyzes and visualizes log files. Some features require payment

Stars0
Forks0
Last commit
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub