angular - 无法在 Web 检查器中禁用电容器插件日志记录
问题描述
我正在使用电容器存储来获取和设置值,如此处所示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)
我的应用程序执行了数百个这样的操作。
尝试按照此处所述禁用这些日志,但仍在记录
https://github.com/ionic-team/capacitor/issues/2438
"hideLogs": true
或者
"ios": {
"hideLogs": true
}
在电容器.config.json 中没有禁用
它甚至在官方文档中提到它,但不起作用,有什么想法吗? https://capacitorjs.com/docs/reference/config
https://capacitorjs.com/docs/apis/console
谢谢
解决方案
在 Capacitor 3 中,您可以使用loggingBehavior配置并将其设置为none:
"loggingBehavior": "none"
推荐阅读
- python - 将布尔值添加到列表会导致 TypeError
- yocto - 列出将包含在主机 Yocto SDK 中的包
- c# - 如何根据我的代码生成消隐和同步信号?
- typescript - 如何在方法装饰器中管理“this”绑定?
- postgresql - 无法针对 tar 文件运行 createdb
- unreal-engine4 - 是否有在编辑器中打开 ue4 到特定文件的命令或功能?
- xml - 如何在 VS2019 中获取 IntelliSense for XML 标签?
- mysql - 使用一组设置值使用 myCon.query 更新表
- flurry-analytics - Flurry 数据下载处理超过 24 小时的 1 个事件,1 天
- c# - 访问模型/数据库而不将 UserState 注入每个对话框