# LogRecordInterceptor

open class LogRecordInterceptor @JvmOverloads() constructor(enabled: Boolean, requestByteCount: Long, responseByteCount: Long) : Interceptor
Content copied to clipboard

网络日志记录器 可以参考此拦截器为项目中其他网络请求库配置. 本拦截器属于标准的OkHttp拦截器适用于所有OkHttp拦截器内核的网络请求库

在正式环境下请禁用此日志记录器. 因为他会消耗少量网络速度

## Constructors

LogRecordInterceptor
Link copied to clipboard
@JvmOverloads()
fun LogRecordInterceptor(enabled: Boolean, requestByteCount: Long = 1024 * 1024, responseByteCount: Long = 1024 * 1024 * 4)
Content copied to clipboard

## Functions

intercept
Link copied to clipboard
open override fun intercept(chain: Interceptor.Chain): Response
Content copied to clipboard

## Properties

enabled
Link copied to clipboard
var enabled: Boolean
Content copied to clipboard
是否启用日志输出
requestByteCount
Link copied to clipboard
var requestByteCount: Long
Content copied to clipboard
请求日志输出字节数, -1 则为全部
responseByteCount
Link copied to clipboard
var responseByteCount: Long
Content copied to clipboard
响应日志输出字节数, -1 则为全部