print All request log called from volley library

前端 未结 1 913
终归单人心
终归单人心 2021-02-06 06:49

I am using volley library to call rest web services and I am using post and get but I don\'t know why I am sending post and it received as post from the server side so I want to

1条回答
  •  花落未央
    2021-02-06 07:23

    Volley prints out information using Log.isLoggable(). This function is kind of weird, so in order to see the volley logs you need to do the following:

    1. (Optional) Change the volley tag to whatever you like using VollyLog.setTag("MyTag"). The default tag is "Volley".
    2. Connect your device to your computer and use the terminal / cmd to call adb shell in the adb location (platform-tools library by default).
    3. In the adb shell type the following command: setprop log.tag.MyTag VERBOSE ("MyTag" should be replaced with whatever your tag is according to step 1).

    The Volley logs will now be printed out.

    Note that this sometimes gets reset, so you'll need to do it again. I think whenever you restart your phone.

    0 讨论(0)
提交回复
热议问题