Closed andrewmunn closed 7 years ago
client.addInterceptor(new LoggingInterceptor.Builder()
.loggable(BuildConfig.DEBUG)
.setLevel(Level.BASIC) // Basic Level
.log(Log.DEBUG)
.request("Request")
.response("Response")
.build());
Level.BASIC log both the your endpoint url with query params, request method, headers and body of request and response.
- URL - Method - Headers - Body
@ihsanbal Maybe add some info about it in your readme. I would not expect BASIC to log everything. Great library by the way!
Is there a way to log both the headers and body of requests and responses? Seems like it's one or the other right now.
I guess I could just add two loggers?