Skip to content

Commit

Permalink
Submitting a ping with upload disabled no longer errors
Browse files Browse the repository at this point in the history
The error message is now just an info message, so that
it doesn't clutter users logs.
  • Loading branch information
Dexterp37 committed Sep 8, 2020
1 parent f1b2279 commit fd4c5ce
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion glean-core/csharp/Glean/Glean.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion glean-core/ios/Glean/Glean.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion glean-core/python/glean/glean.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion glean-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool> {
if !self.is_upload_enabled() {
log::error!("Glean disabled: not submitting any pings.");
log::info!("Glean disabled: not submitting any pings.");
return Ok(false);
}

Expand Down

0 comments on commit fd4c5ce

Please sign in to comment.