Skip to content

Commit 83ed9b5

Browse files
expose Unity side parsing logs for debugging
1 parent 22e7081 commit 83ed9b5

File tree

1 file changed

+6
-6
lines changed
  • c-sharp-chat/PubnubChatApi/PubnubChatApi/Entities

1 file changed

+6
-6
lines changed

c-sharp-chat/PubnubChatApi/PubnubChatApi/Entities/Chat.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ internal void ParseJsonUpdatePointers(string jsonString)
369369
return;
370370
}
371371

372-
Debug.WriteLine($"Received JSON to parse: {jsonString}");
372+
Console.WriteLine($"Received JSON to parse: {jsonString}");
373373

374374
var jArray = JArray.Parse(jsonString);
375375

@@ -392,7 +392,7 @@ internal void ParseJsonUpdatePointers(string jsonString)
392392
continue;
393393
}
394394

395-
Debug.WriteLine($"Parsing JSON:\n--Key: {update.Key},\n--Value: {json}");
395+
Console.WriteLine($"Parsing JSON:\n--Key: {update.Key},\n--Value: {json}");
396396

397397
switch (update.Key)
398398
{
@@ -402,13 +402,13 @@ internal void ParseJsonUpdatePointers(string jsonString)
402402
if (!jObject.TryGetValue("channel_id", out var readChannelId)
403403
|| !jObject.TryGetValue("data", out var data))
404404
{
405-
Debug.WriteLine("Incorrect read recepits JSON payload!");
405+
Console.WriteLine("Incorrect read recepits JSON payload!");
406406
continue;
407407
}
408408

409409
if (!TryGetChannel(readChannelId.ToString(), out var readReceiptChannel))
410410
{
411-
Debug.WriteLine("Can't find the read receipt channel!");
411+
Console.WriteLine("Can't find the read receipt channel!");
412412
continue;
413413
}
414414

@@ -447,7 +447,7 @@ internal void ParseJsonUpdatePointers(string jsonString)
447447
break;
448448
case "event":
449449
case "message_report":
450-
Debug.WriteLine("Deserialized event / message report");
450+
Console.WriteLine("Deserialized event / message report");
451451

452452
if (!CUtilities.IsValidJson(json))
453453
{
@@ -577,7 +577,7 @@ internal void ParseJsonUpdatePointers(string jsonString)
577577
var channelPointer = JsonConvert.DeserializeObject<IntPtr>(json);
578578
if (channelPointer != IntPtr.Zero)
579579
{
580-
Debug.WriteLine("Deserialized channel update");
580+
Console.WriteLine("Deserialized channel update");
581581

582582
var id = Channel.GetChannelIdFromPtr(channelPointer);
583583

0 commit comments

Comments
 (0)