[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling console logs not working #5704

Closed
akashnimare opened this issue May 30, 2020 · 15 comments
Closed

Disabling console logs not working #5704

akashnimare opened this issue May 30, 2020 · 15 comments

Comments

@akashnimare
Copy link

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 11.5
  • Firebase SDK version: latest
  • Firebase Component: Crashlytics/Dynamic Links (Auth, Core, Database, Firestore, Messaging, Storage, etc)
  • Component version: Manual (Zip file)
  • Installation method: CocoaPods | Carthage | Zip file (select one)

[REQUIRED] Step 2: Describe the problems

I can't find a way to disable the analytics logs in Xcode. I have tried the following solutions -

  • Added FirDebugDisabled in my project scheme

image

  • Added the following in AppDelegate -
FirebaseConfiguration.shared.setLoggerLevel(.error)

Logs I'm getting -

2020-05-30 15:43:15.571710+0530 App[40610:743980] [Firebase/Crashlytics] Version 4.1.0
2020-05-30 15:43:15.876410+0530 App[40610:744146] 6.24.0 - [Firebase/Analytics][I-ACS023007] Analytics v.60500000 started
2020-05-30 15:43:15.917793+0530 App[40610:744146] 6.24.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
2020-05-30 15:43:16.056704+0530 App[40610:743980] WF: === Starting WebFilter logging for process App
2020-05-30 15:43:16.056867+0530 App[40610:743980] WF: _userSettingsForUser : (null)
2020-05-30 15:43:16.057026+0530 App[40610:743980] WF: _WebFilterIsActive returning: NO
2020-05-30 15:43:16.120948+0530 App[40610:744133] 6.24.0 - [Firebase/Analytics][I-ACS031025] Analytics screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable screen reporting, set the flag FirebaseScreenReportingEnabled to NO (boolean) in the Info.plist
2020-05-30 15:43:16.323311+0530 App[40610:744141] 6.24.0 - [Firebase/Analytics][I-ACS800023] No pending snapshot to activate. SDK name: app_measurement
2020-05-30 15:43:16.576532+0530 App[40610:744145] 6.24.0 - [Firebase/Analytics][I-ACS800023] No pending snapshot to activate. SDK name: app_measurement
2020-05-30 15:43:16.819869+0530 App[40610:744258] 6.24.0 - [Firebase/Analytics][I-ACS023012] Analytics collection enabled
2020-05-30 15:43:17.809146+0530 App[40610:743980] [ProcessSuspension] 0x10d470780 - ProcessAssertion::processAssertionWasInvalidated()
2020-05-30 15:43:17.875166+0530 App[40610:743980] [ProcessSuspension] 0x10d4707e0 - ProcessAssertion::processAssertionWasInvalidated()
2020-05-30 15:43:18.569350+0530 App[40610:744258] 6.24.0 - [Firebase/Analytics][I-ACS023001] Deep Link does not contain valid required params. URL params: {
    "match_message" = "No pre-install link matched for this device.";
    "request_ip_version" = "IP_V6";
}
@paulb777
Copy link
Member

Does the environment variable noFIRAnalyticsDebugEnabled make a difference?

See https://stackoverflow.com/questions/44419076/completely-disable-firebase-analytics-to-stop-console-spam-on-app-startup/44438819#44438819

@akashnimare
Copy link
Author

Nope, have already tried that.

@paulb777 paulb777 changed the title Disabling trash console logs not working Disabling console logs not working Jun 1, 2020
@paulb777
Copy link
Member
paulb777 commented Jun 1, 2020

It looks like FirebaseAnalytics overrides a previously set log level on initialization. I've created internal issue b/157891084 to track.

@akashnimare
Copy link
Author

@paulb777 any updates on this? The issue is really frustrating since it adds a lot of noise 😭

@rgkobashi
Copy link

The workaround we started using on my team was just create another schema and disabling the whole thing :/
Of course, only during development

@paulb777
Copy link
Member

@akashnimare Sorry no update yet. I've pinged the Analytics team.

@paulb777 paulb777 added this to the 6.30.0 - M77 milestone Aug 4, 2020
@paulb777
Copy link
Member

Should be fixed in today's release.

@akashnimare
Copy link
Author

@paulb777 I'm still getting the logs after updating to the latest. Can you please clarify what's the official process for disabling the logs?

@htcgh
Copy link
Member
htcgh commented Aug 11, 2020

Please ensure that Analytics is at version 6.7.2, -FIRDebugDisabled is included in your scheme, and FirebaseConfiguration.shared.setLoggerLevel(.error) is in your app delegate.

@akashnimare If you already have this exact configuration, can you please share what logs you're still seeing?

@rgkobashi
Copy link

Please ensure that Analytics is at version 6.7.2, -FIRDebugDisabled is included in your scheme, and FirebaseConfiguration.shared.setLoggerLevel(.error) is in your app delegate.

Does this should be before or after calling FirebaseApp.configure()?
On a previous ticket this was required, event though didn't work.

@htcgh
Copy link
Member
htcgh commented Aug 12, 2020

The call order should no longer matter after Analytics 6.7.2.

@rgkobashi
Copy link
rgkobashi commented Aug 18, 2020

Updated to 6.30.0 and still seeing a bunch of logs, using FirebaseConfiguration.shared.setLoggerLevel(.min) changed nothing.

Is there anything else to do?

Edit: ~36 lines of logs every time a UIViewController is shown, with or without setLoggerLevel(.min)

@htcgh
Copy link
Member
htcgh commented Aug 20, 2020

@rgkobashi If you previously used -FIRAnalyticsDebugEnabled to enable debug mode, then I would include both -FIRDebugDisabled and -noFIRAnalyticsDebugEnabled in your scheme. If that still doesn't work, would you mind sharing your logs that include the first few Analytics messages?

@rgkobashi
Copy link

hi @htcgh,

By using -noFIRAnalyticsDebugEnabled and -FIRDebugDisabled works, but according to your docs using -FIRDebugDisabled my measurements will be affected during testing and development and we don't want that, we want to track our events properly on debug and release mode.

TIA

@htcgh
Copy link
Member
htcgh commented Aug 21, 2020

I see. Unfortunately, enabling debug mode with -FIRDebugEnabled to verify events in DebugView and simultaneously suppressing all debug-level Firebase messages in the logs with setLoggerLevel is not a supported use case at this time.

@firebase firebase locked and limited conversation to collaborators Sep 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants