[英]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: 我试过了:
GAI.sharedInstance().logger.logLevel
but that doesn't have effect on these logs. 设置GAI.sharedInstance().logger.logLevel
但这对这些日志没有影响。 FirebaseConfiguration.shared.setLoggerLevel
does silence Firebase logs, but not these GoogleTagManager logs. 设置FirebaseConfiguration.shared.setLoggerLevel
Firebase日志静音,但不会使这些GoogleTagManager日志静音。 -FIRAnalyticsDebugDisabled
argument also doesn't have effect on GoogleTagManager logs. 传递-FIRAnalyticsDebugDisabled
参数也不会对GoogleTagManager日志产生影响。 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.