简体   繁体   English

在iOS上更改GoogleTagManager v5的日志级别

[英]Change the loglevel of GoogleTagManager v5 on iOS

I've integrated GoogleTagManager v5 in an iOS project. 我在一个iOS项目中集成了GoogleTagManager v5。 It's working fine, but now I see these logmessages in the Xcode console: 它工作正常,但现在我在Xcode控制台中看到这些logmessages:

2017-07-14 09:09:19.285 App[23194:15302685] GoogleTagManager info: Loading container: GTM-XXX
2017-07-14 09:09:19.286 App[23194:15302665] GoogleTagManager info: Attempting to load saved version of container GTM-XXX
2017-07-14 09:09:19.310 App[23194:15302665] GoogleTagManager info: Processing logged event: gtm.load with parameters: (null)
2017-07-14 09:09:19.324 App[23194:15302665] GoogleTagManager info: Sending universal analytics hit: {
    "&t" = screenview;
    "&tid" = "UA-000000-1";
}
[...]

To reduce the amount of clutter in my console would like to change the loglevel for GoogleTagManager to warnings and errors only, but I can't find how to do this? 为了减少我的控制台中的混乱程度,我想将GoogleTagManager的loglevel更改为仅警告和错误,但我找不到如何执行此操作?

I've tried: 我试过了:

  • Setting GAI.sharedInstance().logger.logLevel but that doesn't have effect on these logs. 设置GAI.sharedInstance().logger.logLevel但这对这些日志没有影响。
  • Setting FirebaseConfiguration.shared.setLoggerLevel does silence Firebase logs, but not these GoogleTagManager logs. 设置FirebaseConfiguration.shared.setLoggerLevel Firebase日志静音,但不会使这些GoogleTagManager日志静音。
  • Passing the -FIRAnalyticsDebugDisabled argument also doesn't have effect on GoogleTagManager logs. 传递-FIRAnalyticsDebugDisabled参数也不会对GoogleTagManager日志产生影响。
  • Searched for pointers in the GoogleTagManager.h file, but there only seems to be one protocol in the TagManager CocoaPod since v5. 搜索了GoogleTagManager.h文件中的指针,但是从v5开始,TagManager CocoaPod中似乎只有一个协议。 So no logging options there. 所以那里没有日志选项。

Any ideas on how to change the Google Tag Manager log level or how to disable logging entirely? 有关如何更改Google跟踪代码管理器日志级别或如何完全禁用日志记录的任何想法?

我能找到的唯一答案是一个黑暗的魔法与调整: https ://stackoverflow.com/a/45411324/1016656

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 GoogleTagManager v5 iOS设置问题 - GoogleTagManager v5 iOS set up problems 加载 GoogleTagManager 容器时 iOS 应用程序崩溃 - iOS App Crashes while it is loading the GoogleTagManager Container 使用GoogleTagManager时iOS应用被拒绝 - iOS app rejected when using GoogleTagManager 设置setStatusBarHidden:在iOS v5应用程序中。还有一个空白区域。这是解决问题的正确方法吗? - when setting setStatusBarHidden: in iOS v5 app. A blank space remains. Is this the right way to fix it? iOS15 中后退按钮的 headerTintColor 被忽略(react-navigation v5) - headerTintColor ignored for back button in iOS15 (react-navigation v5) 如何在 ios 的 ionic/react v5 中防止“UIColor”没有成员“systemBackground”和“UIStatusBarStyle”没有成员“darkContent”? - How to prevent 'UIColor' has no member 'systemBackground' ` and 'UIStatusBarStyle' has no member 'darkContent' in ionic/react v5 for ios? 使用 v5 beta 构建 AudioKit Cookbook 时出错 - errors building AudioKit Cookbook with v5 beta 在 Swift 中使用 GTM v5 TAGCustomFunction - Using GTM v5 TAGCustomFunction in Swift 启用音频输入 AudioKit v5 - Enable audio input AudioKit v5 使用 Audiokit v5 实现麦克风分析 - Implementing microphone analysis with Audiokit v5
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM