Pick the fix
Release builds log full request bodies, including passwords. What's the fix?
Hint 1 of 1
Which builds need body logging?
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A Add HttpLoggingInterceptor only in debug builds, with BODY level
Correct. Release builds shouldn't log bodies or auth headers.
Why not the others?
- B Switch it to a network interceptor. Still logs everything.
- C Use Log.d instead of Log.i. Debug logs are still captured on release builds.
- D Obfuscate with R8. R8 doesn't hide logged strings.