From fd4c5ce3237cb33305611273887f3f2be9250f51 Mon Sep 17 00:00:00 2001 From: Alessio Placitelli Date: Tue, 8 Sep 2020 11:02:42 +0200 Subject: [PATCH] Submitting a ping with upload disabled no longer errors The error message is now just an info message, so that it doesn't clutter users logs. --- .../android/src/main/java/mozilla/telemetry/glean/Glean.kt | 2 +- glean-core/csharp/Glean/Glean.cs | 2 +- glean-core/ios/Glean/Glean.swift | 2 +- glean-core/python/glean/glean.py | 2 +- glean-core/src/lib.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/glean-core/android/src/main/java/mozilla/telemetry/glean/Glean.kt b/glean-core/android/src/main/java/mozilla/telemetry/glean/Glean.kt index de50527e70..1639ca0615 100644 --- a/glean-core/android/src/main/java/mozilla/telemetry/glean/Glean.kt +++ b/glean-core/android/src/main/java/mozilla/telemetry/glean/Glean.kt @@ -635,7 +635,7 @@ open class GleanInternalAPI internal constructor () { } if (!internalGetUploadEnabled()) { - Log.e(LOG_TAG, "Glean disabled: not submitting any pings.") + Log.i(LOG_TAG, "Glean disabled: not submitting any pings.") return } diff --git a/glean-core/csharp/Glean/Glean.cs b/glean-core/csharp/Glean/Glean.cs index 0880f9f855..46fa8f6428 100644 --- a/glean-core/csharp/Glean/Glean.cs +++ b/glean-core/csharp/Glean/Glean.cs @@ -591,7 +591,7 @@ internal void SubmitPingByNameSync(string name, string reason = null) if (!GetUploadEnabled()) { - Log.Error("Glean disabled: not submitting any pings."); + Log.Information("Glean disabled: not submitting any pings."); return; } diff --git a/glean-core/ios/Glean/Glean.swift b/glean-core/ios/Glean/Glean.swift index d818ca117d..2c4ab94522 100644 --- a/glean-core/ios/Glean/Glean.swift +++ b/glean-core/ios/Glean/Glean.swift @@ -445,7 +445,7 @@ public class Glean { } if !self.internalGetUploadEnabled() { - self.logger.error("Glean disabled: not submitting any pings") + self.logger.info("Glean disabled: not submitting any pings") return } diff --git a/glean-core/python/glean/glean.py b/glean-core/python/glean/glean.py index dda7cd4ffa..1f901b5078 100644 --- a/glean-core/python/glean/glean.py +++ b/glean-core/python/glean/glean.py @@ -548,7 +548,7 @@ def _submit_ping_by_name(cls, ping_name: str, reason: Optional[str] = None) -> N return if not cls._get_upload_enabled(): - log.error("Glean disabled: not submitting any pings.") + log.info("Glean disabled: not submitting any pings.") return sent_ping = _ffi.lib.glean_submit_ping_by_name( diff --git a/glean-core/src/lib.rs b/glean-core/src/lib.rs index 906e437e15..d9c61fcd0f 100644 --- a/glean-core/src/lib.rs +++ b/glean-core/src/lib.rs @@ -584,7 +584,7 @@ impl Glean { /// If collecting or writing the ping to disk failed. pub fn submit_ping(&self, ping: &PingType, reason: Option<&str>) -> Result { if !self.is_upload_enabled() { - log::error!("Glean disabled: not submitting any pings."); + log::info!("Glean disabled: not submitting any pings."); return Ok(false); }