Native Logs

Reading Native Logs with Logcat and Android Studio

DevTools sees only the web side. Crashes, plugin exceptions and the bridge traffic go to Android's log, and Capacitor 243,123 copies every console call there too, under the tag Capacitor/Console. Filtering by the app's process and Capacitor's three tags removes the noise of the rest of the system. After a tap on the lab's Device button and a DiskSpace.eject() typed into the console without a catch:

BookNest's Capacitor tags, from its own process only
PID=$(adb -s emulator-5558 shell pidof com.example.booknest)
adb -s emulator-5558 logcat -d -v tag --pid=$PID \
  -s Capacitor Capacitor/Console Capacitor/Plugin
Output
--------- beginning of main
...
V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 126700244, pluginId: Device,
  methodName: getInfo
V/Capacitor: callback: 126700244, pluginId: Device, methodName: getInfo, methodData: {}
...
E/Capacitor/Console: File: https://localhost/assets/index-uy4BWbYs.js - Line 1012 - Msg:
  Uncaught (in promise) Error: "DiskSpace.eject()" is not implemented on android
...
I/Capacitor/Console: File:  - Line 333 - Msg: {"identifier":"4b4f91ef8a391924"}
...

The V/ lines are the bridge's own log of each call (Message Passing), and the Line 333 lines are its debug echo of every result. The level letter is the quickest filter: E/ marks errors, and an unhandled rejection shows up as Uncaught (in promise). A crash appears under AndroidRuntime with FATAL EXCEPTION, as the missing-Firebase crash of Push Notifications did, so add that tag when the app disappears.

The bridge logging follows loggingBehavior in capacitor.config.ts: 'debug' (the default) logs in debug builds only, 'production' in all builds and 'none' never. Android Studio 234 's Logcat window shows the same stream; the query package:mine tag:Capacitor level:warn narrows it the same way.