Cannot disable logs
Closed this issue · 5 comments
How can I disable logs from plugin?
What do you mean "disable logs"?
You add logs by adding next code:
OkHttpClient.Builder builder = new OkHttpClient.Builder(); if (BuildConfig.DEBUG) { **builder.addInterceptor(new OkHttpProfilerInterceptor());** } OkHttpClient client = builder.build();
Plugin parse the logs and show it in "human readable" way.
So if you disable logs, the plugin will not work too.
All logs are in "verbose" level. So you can change a filter in Logcat to "Debug" and you will not see them.
Logs will not be shown in production build because of if (BuildConfig.DEBUG)
.
And if you are using a Proguard (it strongly recommended for security reasons), this library will be cut at all from the code.
I meant how can I use httpLoggingInterceptor to display logs in logcat and OkHttpProfiller to display requests data in proper window simultaneously. Because part of my team likes to use logs from logcat
Ok, thank you for your advice. And thanks for plugin
The logs from OkhttpLoggingInterceptor almost identical to logs from OkHttpProfilerInterceptor
They can read them in a verbose level of logcat.
Thanks for using OkHttpProfiler Plugin 👍