2

I'm getting every logged messages twice from Google services. Tested with standard Google implementation for Google Analytics. (This standard configuration code is called once - even if it does not matter anyway)

// Configure tracker from GoogleService-Info.plist.
NSError *configureError;
[[GGLContext sharedInstance] configureWithError:&configureError];
NSAssert(!configureError, @"Error configuring Google services: %@", configureError);

// Optional: configure GAI options.
GAI *gai = [GAI sharedInstance];
gai.trackUncaughtExceptions = YES;  // report uncaught exceptions
gai.logger.logLevel = kGAILogLevelVerbose;  // remove before app release

Log:

2016-10-23 22:06:22.354166 [692:208692] [Firebase/Core][I-COR000001] Configuring the default app.
2016-10-23 22:06:22.354 [692] <Debug> [Firebase/Core][I-COR000001] Configuring the default app.
2016-10-23 22:06:22.374475 [692:208692] <FIRAnalytics/INFO> Firebase Analytics v.3404000 started
2016-10-23 22:06:22.374 [692:] <FIRAnalytics/INFO> Firebase Analytics v.3404000 started
...

How come?

adjuremods
  • 2,938
  • 2
  • 12
  • 17
Jakub Truhlář
  • 20,070
  • 9
  • 74
  • 84
  • It's not logging twice. It stores data locally and if the server responds lately then it shows the local data. Try putting a *sleep* before getting a respond from the server. – Onur Tuna Oct 25 '16 at 17:36

1 Answers1

4

I think this is a case of Xcode 8 being extra verbose. I've seen this happen with Xcode 8 running with an actual device (instead of just the simulator).

I'm pretty sure if you enable the OS_ACTIVITY_MODE = disable environment variable (as mentioned in this post), this double-logging should go away.

But to be clear, this is just a case of Xcode printing out extra stuff to the console. Firebase analytics itself isn't logging twice the events that it normally does.

Community
  • 1
  • 1
Todd Kerpelman
  • 16,875
  • 4
  • 42
  • 40