Skip to content

Commit

Permalink
Version 2.0.1: BacktraceApi will print Warning message instead of Err…
Browse files Browse the repository at this point in the history
…or message
  • Loading branch information
konraddysput committed Feb 7, 2020
1 parent 8ca7901 commit 9c24146
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Backtrace Unity Release Notes


## Version 2.0.1
- `BacktraceApi` won't print anymore Error message when Backtrace-integration cannot send data to Backtrace. Now `BacktraceApi` will print warning instead.

## Version 2.0.0
- Backtrace-Unity plugin will set `"Destroy object on new scene"` by default to false.
- Backtrace stack trace improvements,
Expand Down
4 changes: 2 additions & 2 deletions src/Model/BacktraceData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public string ToJson()
["lang"] = "csharp",
["langVersion"] = "Unity",
["agent"] = "backtrace-unity",
["agentVersion"] = "2.0.0",
["agentVersion"] = "2.0.1",
["mainThread"] = MainThread,
["classifiers"] = new JArray(Classifier),
["attributes"] = Attributes.ToJson(),
Expand Down Expand Up @@ -169,7 +169,7 @@ private void SetReportInformation()
Uuid = Report.Uuid;
Timestamp = Report.Timestamp;
LangVersion = "Mono/IL2CPP";
AgentVersion = "2.0.0";
AgentVersion = "2.0.1";
Classifier = Report.ExceptionTypeReport ? new[] { Report.Classifier } : null;
}
}
Expand Down
8 changes: 2 additions & 6 deletions src/Services/BacktraceApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ private IEnumerator Send(string json, List<string> attachments, BacktraceReport
private void PrintLog(UnityWebRequest request)
{
string responseText = Encoding.UTF8.GetString(request.downloadHandler.data);
Debug.LogError($"[Backtrace]::Reponse code: {request.responseCode}, Response text: {responseText}" +
Debug.LogWarning($"[Backtrace]::Reponse code: {request.responseCode}, Response text: {responseText}" +
$"\n Please check provided url to Backtrace service or learn more from our integration guide: https://help.backtrace.io/integration-guides/game-engines/unity-integration-guide");
}

Expand All @@ -146,11 +146,7 @@ private IEnumerator SendAttachment(string rxId, Stack<string> attachments)
request.SetRequestHeader("Content-Type", "application/json");
yield return request.SendWebRequest();

if (request.responseCode == 200)
{
PrintLog(request);
}
else
if(request.responseCode != 200)
{
PrintLog(request);
}
Expand Down

0 comments on commit 9c24146

Please sign in to comment.