1

I've searched for similar problems, but I didn't find anything useful - I'm working with eclipse, and I can't see my Logs.
The device is connected properly, the app runs and does what it's supposed to do, but I get no logs from it.
I get other logs messages from the device, not the ones that I print, e.g. Log.d("SMS", "hello"). On the other hand, if I use the statement System.out.println("hello"), I do see it, tagged as System.out.
I've tried to disconnect and reconnect the device, restart it, close and open eclipse, choose the device from Device window. It happens both with a 'real' device and an emulator. I've also tried to remove the filtering, but nothing helps - I still don't get the logs.

TDG
  • 5,909
  • 3
  • 30
  • 51
  • When you remove the filtering does it show any logs at all? What happens when you open a terminal and exec "adb logcat"? – davidgiga1993 Jul 09 '15 at 09:24
  • @davidgiga1993 As I wrote, when I remove the filtering I see all the logs, except the logs that I write. – TDG Jul 09 '15 at 09:31

3 Answers3

3

Okay, I've found the problem -
Apprently there are some illegal tags, and I've used one of them.
My app is spam SMS blocker, and I've used the tag SMS. If I change it to another tag (like SMSBlocker) it suddenly appears in the LogCat.

TDG
  • 5,909
  • 3
  • 30
  • 51
0

Check if your project is using proguard. Basically proguard will remove all the debug logs and optimize your code while creating apk.

Try adding proguard.enabled=false in your project.properties

Arunkumar
  • 3,812
  • 3
  • 22
  • 30
  • Thanks, but it didn't help. I've also tried to change the log level to `i`, and it still won't print it. – TDG Jul 09 '15 at 09:34
0

I think you should use TAG.

When you log from your android app, the first parameter is a TAG string. So if you set it up to a unique string (like your app name) then you can later filter by it in Eclipse.

Example : Log.e(TAG, "state error");
Mr Robot
  • 1,747
  • 6
  • 35
  • 67
  • Thank you, but as you can see in my question, I do use a tag - `Log.d("myApp", "hello")`. The tag is "myApp". – TDG Jul 09 '15 at 10:17