0

Maybe it's a dumb question but I couldn't find the solution.

The problem it's that I put logs in all my Android app and it doesn't appear on the logcat. I don't know why now they don't appear because some days ago they appeared normally.

I put the logs like:

Log.d("prove", "this works");

And in the logcat just appears sentences like:

ACT-AM_ON_PAUSE_CALLED....
ACT-PAUSE_ACTIVITY_FINISHING....
ACT-AM_ON_RESUME_CALLED....

and similars. The .... refers that the sentences are bigger (they show the activity that it's doing the proccess but I obviate to put here because they are too long).

What could be the problem? Maybe a configuration that has been changed? (I didn't change any configuration but maybe I missclick in some botton and change something by error).

Thanks in advance!

Francisco Romero
  • 12,787
  • 22
  • 92
  • 167

2 Answers2

1

maybe your logs are displayed on console but you can notice them because your console scroll logs so fast.

Please try use filters for logcat. Example:

adb logcat *:S prove:D

Will display only logs from tag "prove"

Such filters can be sets in configuration of the device which you use, set by adb.

mariopce
  • 1,116
  • 9
  • 17
  • If I just use `adb logcat`, as you said, it scroll logs so fast. But if I execute `adb logcat *:S prove:D` it just gives to me `--------- beginning of /dev/log/system` and `--------- beginning of /dev/log/main`. Nothing more. – Francisco Romero Aug 20 '15 at 14:15
  • Also I have a doubt. Have I to execute it before executing my programm or while I'm executing it? I execute it from a mobile phone. – Francisco Romero Aug 20 '15 at 14:18
  • Ok, now it works. Thanks a lot! But can you explain me please what exactly does `:S` and `:D`? – Francisco Romero Aug 20 '15 at 14:21
  • yes explanation is *:S - made all tags (* - star) silent (S - silent), mytag:D - for mytag set a Debug mode. More info http://stackoverflow.com/questions/6854127/filter-logcat-to-get-only-the-messages-from-my-application-in-android?rq=1 – mariopce Aug 20 '15 at 14:25
  • Do you mean that for example if I have the log `Log.d("prove","this works")` it ignore all `("` before `prove`? – Francisco Romero Aug 20 '15 at 14:28
  • no, this *:S , and tag:D , and others like *:I *:V tag:I are just filters, this don't have influence on logs, but only on displaying the logs. Using filters don't delete any logs. You can run one adb with filters in one console and secound adb without filters on another console. – mariopce Aug 20 '15 at 14:36
0

Maybe it's a dumb answer, but are you sure, that you didn't change logging level (error, verbose etc.)? :)

Anton
  • 449
  • 2
  • 7
  • 20
  • Yes, it is. Strange. In such situations I also try Cntrl+F and search my logging marker, as it may be a lot of logs and I just don't see mine ones. Otherwise don't even know. I will follow your question to find out for myself. – Anton Aug 20 '15 at 14:20
  • With the answer of `mariopce` but there I just can see the logs in the `Terminal` and not in the `logcat`. – Francisco Romero Aug 20 '15 at 14:23