Ray*_*son 6 typescript ionic-framework angular capacitor
我正在使用 Capacitor 存储来获取和设置值,如下所示https://capacitorjs.com/docs/apis/storage 一切正常,但是我在使用 xcode 模拟器和 safari web 检查器进行开发时收到大量控制台消息,每个我获取和设置值的时间:
>native Storage.get (#284123)
>native Storage.get (#284124)
>native Storage.get (#284125)
>result Storage.get (#284123)
>native Storage.get (#284126)
Run Code Online (Sandbox Code Playgroud)
我的应用程序执行数百个这样的操作。
尝试按照此处所述禁用这些日志,但仍在记录
https://github.com/ionic-team/capacitor/issues/2438
"hideLogs": true
Run Code Online (Sandbox Code Playgroud)
或者
"ios": {
"hideLogs": true
}
Run Code Online (Sandbox Code Playgroud)
在 Capacitor.config.json 中未禁用
它甚至在官方文档中提到了它,但不起作用,有什么想法吗? https://capacitorjs.com/docs/reference/config
https://capacitorjs.com/docs/apis/console
谢谢
在 Capacitor 3 中,您可以使用loggingBehavior配置并将其设置为none:
"loggingBehavior": "none"
Run Code Online (Sandbox Code Playgroud)
好吧..更新以帮助任何其他可怜的灵魂,与电容器console.log的折磨作斗争,需要解决方案......
Ended up going to native-bridge.js file for project
commented out entire functions for:
capacitor.logToNative
capacitor.logFromNative
cli -> npx capacitor sync
Run Code Online (Sandbox Code Playgroud)
谢谢你的电容器,你的日志页面堵塞了我的系统并使我的CPU过热..现在已经说得够多了...请保持安静。
谢谢你!