LogRecorder

object LogRecorder

日志记录器

Functions

generateId
Link copied to clipboard
fun generateId(): String
产生一个唯一的基于时间戳Id
recordException
Link copied to clipboard
fun recordException(id: String, requestMillis: Long, code: Int?, response: String?, error: String?)
发送请求异常到记录器
recordRequest
Link copied to clipboard
fun recordRequest(id: String, url: String, method: String, headers: Map<String, List<String>>, body: String?)
发送请求信息到记录器中
recordResponse
Link copied to clipboard
fun recordResponse(id: String, requestMillis: Long, code: Int, headers: Map<String, List<String>>, body: String?)
发送响应信息到记录器中

Properties

enabled
Link copied to clipboard
var enabled: Boolean = true
是否启用日志记录器