3

I have read quite a few questions regarding "Removing Logs" but none answered my question. So, I have to ask here again.

What is the impact of Log.d() or Log.v() or Syso() statements, on the application?

Let's say I have an application with 200 syso() statements, or Logs, that I used to debug while creating the app. I didn't bother to remove them, because, (I am a newbie in android) and I thought, there is no way those statements gets printed or displayed. So, why take the pain of removing all those lines.

So how far my idea of not removing the logs effect the application? Will it increase the size of the application (cached data or something)?

@All, I think you don't are misunderstanding what I am asking for. I know Google advises us to remove the logs, and I am not questioning that. I want to know, what's the impact of those logs on my application, if i don't remove the logs

Vamsi Challa
  • 11,038
  • 31
  • 99
  • 149

2 Answers2

2

You should remove all log messages. Else the user can see them via logcat. But nothing will happen with your app (no increase size etc.)

Read this if you want to know how to remove them on the fly while deploying: Remove all debug logging calls before publishing: are there tools to do this?

Community
  • 1
  • 1
Terel
  • 3,857
  • 1
  • 25
  • 28
  • Do we have a logcat on Mobile? Can users see the logs after the application has been installed from GooglePlay on to the mobile, through Logcat? – Vamsi Challa Jan 31 '13 at 09:53
  • 1
    If the users can see logcat from Mobile, where do I find the logcat on my Mobile? – Vamsi Challa Jan 31 '13 at 09:54
  • Yep this is possible. Either via LogCat with his PC or several Apps which give the possibility to read them on the device itself. – Terel Jan 31 '13 at 09:55
  • e.g. with this app you can see LogCat messages on your device: https://play.google.com/store/apps/details?id=org.jtb.alogcat – Terel Jan 31 '13 at 09:56
0

Read the section - Preparing Your Application for Release http://developer.android.com/tools/publishing/publishing_overview.html

Anukool
  • 5,301
  • 8
  • 29
  • 41