Ioniconf 2022 logo

Uniting our global community of Ionic developers and contributors. May 25, 2022.

DocsPluginsCLI
pwaiosandroid

Console

The Console API automatically sends console.debug, console.error, console.info, console.log, console.trace and console.warn calls to the native log system on each respective platform. This enables, for example, console.log calls to be rendered in the Xcode and Android Studio log windows.

It can be disabled by using hideLogs entry in capacitor.config.json, check common configuration for more information.

Example

console.log("I really enjoy Avocado Toast, and I'm not ashamed to admit it");

The string will show up in your Xcode or Android Studio log stream.

Previous
<- Clipboard
Next
Device ->
Contribute ->