Sign in Go Pro


Configuring a HTTP Logging Interceptor for the OkHttpClient

This lesson is for PRO members.

Upgrade today to get access to all the PRO lessons.

Unlock this lesson

Up next



In this Lesson you will learn:

  • How and why its useful to have HTTP Logging within Retrofit
  • How to build a custom OkHttpClient
  • How to add an interceptor to your custom OkHttpClient
  • How to configure different logging levels for different build configurations
  • What the different logging levels provide

- Retrofit Documentation




Hey Donn, thanks for showing how to reduce the logs for the release build variants. That is one of the things our QA team has been complaining about for security reasons for a while and this will come in handy.

I couldn't hold myself and made a Pull Request before going to bed to have this sorted out as soon as possible.

Christian, you bet. Glad it helped. :)


Lessons in RetroFit2