Skip to content

SettingsCacheClient prints instead of logging #15138

@prengifo

Description

@prengifo

Description

Hi,

Since this #14599 got merged, the SettingsCacheClient prints the duration of the cache directly into the console instead of using a logger. This creates a bit of noise, specially while using Previews in Xcode. After each update of code, the cache client is called and prints again the number.

For now I prevented this by not initialising the SDK while using previews, but it still prints once this information while running the app in device.

Image

Reproducing the issue

  1. Add Firebase SDK to project
  2. Use Crashlytics in target
  3. Add Firebase.init() into AppDelegate
  4. Create a SwiftUI file and check the preview console log

Firebase SDK Version

Since 11.14.0

Xcode Version

16.4

Installation Method

Swift Package Manager

Firebase Product(s)

Crashlytics

Targeted Platforms

iOS

Relevant Log Output

Duration: 190511.0
Duration: 190511.0
Duration: 190511.0
Duration: 190511.0
Duration: 190511.0

If using Swift Package Manager, the project's Package.resolved

Expand Package.resolved snippet
{
  "originHash" : "30f365347818283c0e54b360f03fef240c0eccdbdd8f2bf2071141ff5f22b37a",
  "pins" : [
    {
      "identity" : "abseil-cpp-binary",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/abseil-cpp-binary.git",
      "state" : {
        "revision" : "bbe8b69694d7873315fd3a4ad41efe043e1c07c5",
        "version" : "1.2024072200.0"
      }
    },
    {
      "identity" : "app-check",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/app-check.git",
      "state" : {
        "revision" : "21fe1af9be463a359aaf8d96789ef73fc3760d09",
        "version" : "11.0.1"
      }
    },
    {
      "identity" : "app-shared-library",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/ecomid/app-shared-library",
      "state" : {
        "revision" : "48b531067d9cf67d0617ff05c69bd897d85334f6",
        "version" : "1.2.1"
      }
    },
    {
      "identity" : "codescanner",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/twostraws/CodeScanner",
      "state" : {
        "revision" : "5e886430238944c7200fc9e10dbf2d9550dba865",
        "version" : "2.5.2"
      }
    },
    {
      "identity" : "firebase-ios-sdk",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/firebase/firebase-ios-sdk",
      "state" : {
        "revision" : "4e62da1e5e6baf61674d3f5ae23d6d60c19f9c4a",
        "version" : "12.0.0"
      }
    },
    {
      "identity" : "google-ads-on-device-conversion-ios-sdk",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/googleads/google-ads-on-device-conversion-ios-sdk",
      "state" : {
        "revision" : "428d8bb138e00f9a3f4f61cc6cd8863607524f65",
        "version" : "2.1.0"
      }
    },
    {
      "identity" : "googleappmeasurement",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/GoogleAppMeasurement.git",
      "state" : {
        "revision" : "63c18311aac00032f15f5ce431c9e83ada96c386",
        "version" : "12.0.0"
      }
    },
    {
      "identity" : "googledatatransport",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/GoogleDataTransport.git",
      "state" : {
        "revision" : "617af071af9aa1d6a091d59a202910ac482128f9",
        "version" : "10.1.0"
      }
    },
    {
      "identity" : "googleutilities",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/GoogleUtilities.git",
      "state" : {
        "revision" : "60da361632d0de02786f709bdc0c4df340f7613e",
        "version" : "8.1.0"
      }
    },
    {
      "identity" : "grpc-binary",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/grpc-binary.git",
      "state" : {
        "revision" : "cc0001a0cf963aa40501d9c2b181e7fc9fd8ec71",
        "version" : "1.69.0"
      }
    },
    {
      "identity" : "gtm-session-fetcher",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/gtm-session-fetcher.git",
      "state" : {
        "revision" : "a2ab612cb980066ee56d90d60d8462992c07f24b",
        "version" : "3.5.0"
      }
    },
    {
      "identity" : "interop-ios-for-google-sdks",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/interop-ios-for-google-sdks.git",
      "state" : {
        "revision" : "040d087ac2267d2ddd4cca36c757d1c6a05fdbfe",
        "version" : "101.0.0"
      }
    },
    {
      "identity" : "leveldb",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/firebase/leveldb.git",
      "state" : {
        "revision" : "a0bc79961d7be727d258d33d5a6b2f1023270ba1",
        "version" : "1.22.5"
      }
    },
    {
      "identity" : "lottie-spm",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/airbnb/lottie-spm",
      "state" : {
        "revision" : "04f2fd18cc9404a0a0917265a449002674f24ec9",
        "version" : "4.5.2"
      }
    },
    {
      "identity" : "nanopb",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/firebase/nanopb.git",
      "state" : {
        "revision" : "b7e1104502eca3a213b46303391ca4d3bc8ddec1",
        "version" : "2.30910.0"
      }
    },
    {
      "identity" : "promises",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/google/promises.git",
      "state" : {
        "revision" : "540318ecedd63d883069ae7f1ed811a2df00b6ac",
        "version" : "2.4.0"
      }
    },
    {
      "identity" : "swift-protobuf",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/apple/swift-protobuf.git",
      "state" : {
        "revision" : "edb6ed4919f7756157fe02f2552b7e3850a538e5",
        "version" : "1.28.1"
      }
    },
    {
      "identity" : "zephyr",
      "kind" : "remoteSourceControl",
      "location" : "https://github.com/ArtSabintsev/Zephyr.git",
      "state" : {
        "revision" : "b0dda179006b354680b1df96e279134a704b0c06",
        "version" : "3.8.0"
      }
    }
  ],
  "version" : 3
}

If using CocoaPods, the project's Podfile.lock

Expand Podfile.lock snippet
Replace this line with the contents of your Podfile.lock!

Metadata

Metadata

Assignees

Labels

sessionsChanges pertaining to the Firebase Sessions SDK

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions