1

For some reason, I can't seem to output anything in Logcat for the watchface example that you can pull from Github's repo. I've enabled the development features in the watch emulator. I have the latest Android Studio. When I start a brand new project, I can output to Logcat without a hitch. What am I doing wrong?

wavyGravy
  • 787
  • 2
  • 6
  • 17

1 Answers1

2

I know this is an old question, but in case somebody is still coming across this looking for an answer:

I assume you're talking about Googles Watchface example?

That example uses isLoggable to write to the logfiles, for example:

    if (Log.isLoggable(TAG, Log.DEBUG)) {
        Log.d(TAG, "onConnected: " + connectionHint);
    }

As you can read in the documentation for Log.isLoggable, the isLoggable function is basically just a method of customizing/optimizing your log messages, and returns false by default.

If you want to enable logging on DEBUG level you can do this via command line with this shell command:

adb shell setprop log.tag.NameOfMyActivity DEBUG

Hope this helps.

Yuri Schimke
  • 12,435
  • 3
  • 35
  • 69
Koinseb
  • 73
  • 6