Skip to content

Commit 753cb16

Browse files
committed
Add logging to figure out what's up
1 parent e10d91b commit 753cb16

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

com.unity.netcode.gameobjects/Runtime/Logging/ContextualLogger.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ internal DisposableContext(ContextualLogger logger, string toClear)
207207

208208
public void Dispose()
209209
{
210+
Debug.Log($"Disposing disposable value: {m_ToClear}");
210211
m_Logger.RemoveInfo(m_ToClear);
211212
}
212213
}

com.unity.netcode.gameobjects/Runtime/Logging/LogContext/GenericContext.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using UnityEngine;
34

45
namespace Unity.Netcode.Logging
56
{
@@ -40,6 +41,12 @@ public void StoreTag(string msg)
4041

4142
public void StoreInfo(object key, object value)
4243
{
44+
if (m_Info.TryGetValue(key, out var currentValue))
45+
{
46+
Debug.Log($"Adding info: {key}={value}. Existing value: {currentValue}");
47+
m_Info[key] = value;
48+
return;
49+
}
4350
m_Info.Add(key, value);
4451
}
4552

0 commit comments

Comments
 (0)