https://kotlinlang.org logo
#android-architecture
Title
# android-architecture
u

ursus

04/26/2019, 6:44 PM
Does anyone have a logging interceptor for okhttp, that is not totally useless with parallel requests? How the fck am I suppsed to read interleaved lines 😕
a

arekolek

04/27/2019, 9:08 PM
StethoInterceptor()
which outputs to Chrome developer tools network tab
u

ursus

04/28/2019, 12:23 AM
thx
@arekolek mate, it works well, however, how do you automatically run it on app start? From what I can tell I need to go to chrome://inspect then pick my phone, and only then it receives debug info. however if I restart the app that chrome thing disconnects, so again manually and im missing requests from app start
r

rattleshirt

04/30/2019, 8:17 AM
Did you try the Android Studio Profiler yet?
👍 1
a

arekolek

04/30/2019, 9:30 AM
Right, I totally forgot about the profiler, it is tracking network requests too for some time, but I haven’t been using it so I don’t remember if it suited my needs or not
Personally I didn’t do anything about reconnecting to Stetho (although it has been frustrating for me as well), I use it sparingly, when Logcat is not enough
But there was somebody that hacked something together for Mac OS https://gist.github.com/drd/cf45dccd481bb1f8ccc85160fdf8be83
u

ursus

04/30/2019, 3:49 PM
im fine with logs but for me if I run two parallel requests, the responses look like
Copy code
json A line 1
json B line 1
json A line 2
json B line 2
...
@rattleshirt Oh I didnt think about that,..Im trying it right now but..is there a way I can see the requests comming in automatically (in Connection View), without selecting part of the "timeline" ?
also the profiles doesnt start automatically if I restart the app 😞 its same as stetho basically
r

rattleshirt

05/01/2019, 7:41 AM
Don’t think so, you have to select the timeline. It has also been buggy for me recently 😞
u

ursus

05/01/2019, 2:34 PM
Shame, is there a way to increate logcat message size? Clipping is the only issue I can think of why they would separate it into lines
5 Views