question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

feat: How to turn off native capacitor plugin logging

See original GitHub issue

Feature Request

Describe the Feature Request

My console gets filled with lots of logs coming from my capacitor plugin. It logs out

<PluginName>.addListener <PluginName>.subscribe

Calls from my plugin

I have tried both of the below in my capacitor.config.json from these links: https://github.com/ionic-team/capacitor/pull/1640 https://github.com/ionic-team/capacitor/issues/1431

{
  "production": true,
  "useLog": false,
}

Screenshot 2020-02-12 at 16 11 18 Screenshot 2020-02-12 at 16 12 00

Platform Support Requested

  • Android
  • iOS
  • Electron
  • Web

Describe Preferred Solution

Config option for disabling all CAPLogs

Describe Alternatives

A console flag ?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
inorganikcommented, Aug 4, 2022

@jcesarmobile We currently have an all-or-nothing situation - where if we silence plugin logs we also silence logs in our code (at least in the Xcode console). Is there a way to just disable a specific plugin’s logs? I would like to disable logs for @capacitor/storage (super noisy) but I still need to see my logs.

2reactions
jcesarmobilecommented, Feb 19, 2020

it’s

"ios": {
    "hideLogs": true
}

leaving open to document it

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to turn off Capacitor logs in Ionic Portals
The Capacitor Plugins I'm using (for example Filesystem). I can't turn the logging off. I've tried setting loggingBehavior to 'none' in the ...
Read more >
Cannot disable capacitor plugin logging in web inspector
In Capacitor 3 you can use loggingBehavior config and set it to none: "loggingBehavior": "none".
Read more >
Console | Capacitor Documentation
It can be disabled by using hideLogs entry in capacitor.config.json , check common configuration for more information. Example​. console.log ...
Read more >
Migrating from PhoneGap Build to Ionic Appflow
Migrating from Adobe's PhoneGap Build to Ionic Appflow involves just a few simple steps. In this guide, we'll walk through the complete migration...
Read more >
Supporting Dark Mode in Ionic Capacitor | by Hinddeep Purohit
The web and the native layers can interact with each other by using a bridge ... Capacitor plugins cannot be consumed on Cordova...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found