An OkHttp interceptor with a pretty logger for Android HTTP requests and responses, including mock support.
LoggingInterceptor is an OkHttp3 interceptor library for Android that logs HTTP request and response details in a formatted, readable way. It solves the problem of debugging network calls by providing structured logs with configurable detail levels and built-in mock support for development.
Android developers using OkHttp for network requests who need to debug API calls, inspect HTTP traffic, or mock responses during app development.
Developers choose LoggingInterceptor for its clean, customizable logging output, mock API capabilities, and seamless integration with OkHttp, making network debugging faster and more efficient than manual logging or basic OkHttp logging.
An OkHttp interceptor which has pretty logger for request and response. +Mock support
Formats HTTP request and response data into structured, easy-to-read Logcat output, making network debugging faster and more intuitive.
Enables mocking API responses with custom JSON via a BufferListener, allowing development without a live backend for testing.
Supports NONE, BASIC, HEADERS, and BODY levels to control log detail, giving developers fine-grained control over what is logged.
With custom sinks like BatchingSink, logs can be batched to avoid interleaving in Logcat, improving readability in multi-threaded scenarios.
Requires excluding the 'org.json' module in Gradle to avoid conflicts, which can be cumbersome and error-prone in complex projects.
Tied to Android's Logcat, which truncates lines at ~4k characters, necessitating custom chunking for large HTTP bodies as noted in the README.
Enabling mock support requires implementing a BufferListener and managing JSON files manually, adding initial setup overhead compared to simpler tools.
✔️ Simple, pretty and powerful logger for android
A logger with a small, extensible API which provides utility on top of Android's normal Log class.
📄The reliable, generic, fast and flexible logging framework for Android
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.