# ihsanbal/LoggingInterceptor

An OkHttp interceptor which has pretty logger for request and response. +Mock support

Repository: https://github.com/ihsanbal/LoggingInterceptor
Canonical: https://ross.abutalabs.com/products/logginginterceptor
Language: Kotlin
License: MIT
License Family: permissive
Topics: android, okhttp, logginginterceptor, logging-library, java, java-library, interceptor, mock, mocking-framework, kotlin
Last push: 2026-02-19T03:07:17+00:00

## Health v2 (maintenance only)
Score: 63/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 68, release rhythm 36, longevity 100
- inputs: {"age_days": 3479, "days_push": 195, "days_rel": 212, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1359, forks 122 (observed 2026-08-28T04:04:29.810104+00:00)

## What it is
An OkHttp interceptor library that provides pretty, configurable logging of HTTP requests and responses, with support for custom log levels, headers, query params, and mock responses. This fork adds batching sinks to avoid Logcat line interleaving and truncation.

## Use cases
- log okhttp requests and responses in an android app
- debug http traffic with pretty logcat output
- add custom headers and query params to logged requests
- mock http responses during development
- batch log output to avoid logcat truncation

## When to choose
- you use OkHttp/Retrofit on Android or JVM and want readable HTTP logs
- you need mock response support alongside request logging
- you want a customizable log level and sink for HTTP traffic

## When to avoid
- you don't use OkHttp as your HTTP client
- you need full network traffic capture beyond OkHttp (use a proxy like Charles or mitmproxy)
- you need production-grade structured logging pipelines rather than debug logging

## Facets
- artifact type: library
- maturity: active
- function: logging, http-client, mocking, middleware
- domain: developer-tools, android-tools, web-development, testing
- platform: jvm
- tags: okhttp, interceptor, logcat, http-debugging, mock-responses, android

## Member repositories
- ihsanbal/LoggingInterceptor (main) score 63

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:29.810104+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-30T04:41:42.613929+00:00, confidence not recorded.
  - readme: https://github.com/ihsanbal/LoggingInterceptor (fetched 2026-08-28T04:04:29.810104+00:00, sha 5c10373a723d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
