2

I have two smartphones one Nexus 4 and one Vodafone Smart 3 (TLC - Alcatel v975). In my Sourcecode I have two log.d and if I make the debugging on Nexus the log.d appear in Logcat, but when I'm using Vodafone Smart 3 , log.d doesn't appear in Logcat ... My Sourcecode is the following :

public void savetime(View view){

    Integer hour= mitsos.getCurrentHour();
    Integer minutes=mitsos.getCurrentMinute();
    Log.d("mitsos","hour "+hour);
    Log.d("mitsos","minutes"+minutes);}
mikopos
  • 41
  • 1
  • 7
  • 2
    "Debug logs are compiled in but stripped at runtime". quoting from http://developer.android.com/reference/android/util/Log.html. "Error, warning and info logs are always kept". Use `Log.i()`. – Raghunandan Jun 22 '13 at 17:55
  • And why does it happen only with my Vodafone smart 3 and not with Nexus ?! – mikopos Jun 22 '13 at 18:25
  • no idea about that haven't come across such a situation till now/ – Raghunandan Jun 22 '13 at 18:26

3 Answers3

4

Some device not print debug log, but you can use below method

Log.wtf("tag","msg");

its working for me.

Yogesh Rathi
  • 6,331
  • 4
  • 51
  • 81
0

Try "Unable to open log device '/dev/log/main': No such file or directory", set the log level.

If you don't see the service menu, make sure that your ROM support it, otherwise you maybe need to use another ROM (usually official) or just use Log.i() instead.

Community
  • 1
  • 1
mookrs
  • 11
  • 2
0

you can use System.out.println("") as well for wrting to log cats.I have also come across with the same problem on my device.Sometime device did log but sometime didnt. but System.out.println("") always works for me.

Waqar Ahmed
  • 5,005
  • 2
  • 23
  • 45