2

I'm noticing that in my release builds there is still a bunch of Volley generated logs appearing in LogCat. Looking at VolleyLog.java, only verbose logs seem to be stripped out in release builds. Sadly, VolleyLog is hardcoded into many classes, and there doesn't seem to be any options to replace the Volley Logger other than forking Volley and making some changes to VolleyLog. Is there any mechanism for choosing my logging preference in Volley or am I going to need to fork it to disable logs in release?

Matthew
  • 6,356
  • 9
  • 47
  • 59
  • You can use proguard for it. See this question http://stackoverflow.com/questions/15571520/how-to-configure-proguard-to-only-remove-android-logging-calls. – Dzmitry Lukoits Nov 19 '13 at 08:34
  • I'm also facing the same problem. Is there any better way other than this proguard solution? – Anees U Nov 19 '15 at 10:26

2 Answers2

2

You can use proguard for it. See this question How to configure proguard to ONLY remove android logging calls. Also you can use this string in VolleyLog class: public static boolean DEBUG = BuildConfig.DEBUG;

Community
  • 1
  • 1
1

Found the solution here.

By adding:

VolleyLog.DEBUG = false;

It stops logging.

Community
  • 1
  • 1
Anees U
  • 1,077
  • 1
  • 12
  • 20