Tek*_*ock 79 iphone ios firebase
每当我启动FireBase应用程序时,它都会记录各种Firebase功能的状态.现在这是记录的内容:
Configuring the default app.
<FIRAnalytics/INFO> Firebase Analytics v.3200000 started
<FIRAnalytics/INFO> To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see ...)
<FIRAnalytics/INFO> Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist
<FIRInstanceID/WARNING> FIRInstanceID AppDelegate proxy enabled, will swizzle app delegate remote notification handlers. To disable add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
<FIRAnalytics/INFO> Firebase Analytics enabled
Run Code Online (Sandbox Code Playgroud)
我查看了pod并且没有找到任何打印语句,那么我怎样才能阻止这些超时记录我运行应用程序?
Ian*_*ber 93
您可以使用该标志禁用调试日志记录-FIRDebugDisabled
.
您可以将其添加到您的方案中:
-FIRDebugDisabled
Rap*_*ira 47
FirebaseConfiguration.shared.setLoggerLevel(.min)
之前添加FirebaseApp.configure()
以实现最少量的日志记录.
func setupFirebase() {
FirebaseConfiguration.shared.setLoggerLevel(.min)
FirebaseApp.configure()
}
Run Code Online (Sandbox Code Playgroud)
Suj*_*U N 13
默认情况下,Firebase会记录信息,错误和警告.
所以你可以设置你需要的记录器级别.
如果设置为.Error,则只有在出现错误时才会获得min log.
FirebaseApp.configure()之前的setLoggerLevel如下所示
在Swift 2.3和Firebase 4中
FirebaseConfiguration.sharedInstance().setLoggerLevel(.Error)
FirebaseApp.configure()
Run Code Online (Sandbox Code Playgroud)
在Swift 3和Firebase 4中
FirebaseConfiguration.shared.setLoggerLevel(.min)
FirebaseApp.configure()
Run Code Online (Sandbox Code Playgroud)
在我的情况下,从Firebase隐藏额外的控制台日志块我做了以下事情:
FIRConfiguration.sharedInstance().setLoggerLevel(.min)
FIRApp.configure()
Run Code Online (Sandbox Code Playgroud)
在Swift 4中
Swift 4 Firebase 4.10
在您的AppDelegate.swift中设置记录器级别
FirebaseConfiguration().setLoggerLevel(FirebaseLoggerLevel.min)
Run Code Online (Sandbox Code Playgroud)
这是完整的代码:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
FirebaseConfiguration().setLoggerLevel(FirebaseLoggerLevel.min)
FirebaseApp.configure()
return true
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
45334 次 |
最近记录: |