Volley的详细调试日志 [英] Detailed debug logs with Volley
问题描述
在iOS上的Restkit中,有一个详细的调试选项. RKLogConfigureByName("*", RKLogLevelTrace);
.有人知道Volley是否有同等学历.基本上,我直接进入ErrorListener,但在LogCat中没有得到任何其他信息.两者:
In Restkit on iOS there is a verbose debug option. RKLogConfigureByName("*", RKLogLevelTrace);
. Does anyone know if there is an equivalent for Volley. Basically I am going straight to the ErrorListener but I get no additional info in LogCat. Both:
VolleyLog.e("Error: ", error.toString());
并且:
VolleyLog.e("Error: ", error.getMessage());
打印:
2.onErrorResponse: Error:
推荐答案
如果要从凌空库中获取详细日志,则必须使用adb
If you want verbose Log from the volley library, you have to use adb
adb -s 42f63b0de7318fe1 shell setprop log.tag.Volley VERBOSE
其中"42f63b0de7318fe1
"是您将通过的设备ID
where "42f63b0de7318fe1
" is your device id which you will get by
adb devices
如果您要保留此设置,请使用
If you want to persist this setting use
adb -s 42f63b0de7318fe1 shell setprop persist.log.tag.Volley VERBOSE
如果只有1个设备,则可以省略-s
参数
If you have only 1 device you can omit the -s
argument
另请参见如何设置eclipse中的ADT系统属性,因此它始终可以运行
杀死并重新启动您的应用以应用设置.
Kill and restart your app to apply the setting.
这篇关于Volley的详细调试日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!