Files
firebase-ios-sdk/GoogleDataTransport
BJ Homer 3642b56224 Delay GDTCORUploadCoordinator timer initial run (#7173)
If an upload coordinator gets created during `+load` calls, it can end up running its immediately, while +load calls are still running. It's generally a bad idea to be splitting off threads while +load calls are still running.

The upload coordinator checks every 30 seconds, and doesn't really need to run right away. Since it's easy to transitively create an upload coordinator from other calls that happen during +load, we'll just push off the initial run of the timer slightly. That makes it less likely to interfere (or deadlock) with other load calls.

See #7171 for an example of a problem solved by this change.
2020-12-15 17:03:29 -05:00
..

Google Data Transport Lib

This library is for internal Google use only. It allows the logging of data and telemetry from Google SDKs.

Set logging level

Swift

  • Import GoogleDataTransport module:
    import GoogleDataTransport
    
  • Set logging level global variable to the desired value before calling FirebaseApp.config():
    GDTCORConsoleLoggerLoggingLevel = GDTCORLoggingLevel.debug.rawValue
    

Objective-C

  • Import GoogleDataTransport:
    #import <GoogleDataTransport/GoogleDataTransport.h>
    
  • Set logging level global variable to the desired value before calling -[FIRApp config]:
    GDTCORConsoleLoggerLoggingLevel = GDTCORLoggingLevelDebug;
    

Prereqs

  • gem install --user cocoapods cocoapods-generate
  • brew install protobuf nanopb-generator
  • easy_install --user protobuf

To develop

  • Run generate_project.sh after installing the prereqs

When adding new logging endpoint

  • Use commands similar to:
    • python -c "line='https://www.firebase.com'; print line[0::2]"
    • python -c "line='https://www.firebase.com'; print line[1::2]"

When adding internal code that shouldn't be easily usable on github

  • Consider using go/copybara-library/scrubbing#cc_scrub