TDG
TDG

Reputation: 6171

LogCat won't show my logs

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.

Upvotes: 1

Views: 1742

Answers (3)

TDG
TDG

Reputation: 6171

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.

Upvotes: 3

Mr Robot
Mr Robot

Reputation: 1747

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");

Upvotes: 0

Arunkumar
Arunkumar

Reputation: 3841

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

Upvotes: 0

Related Questions