mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
ThreadLog: more obvious prefix!
This commit is contained in:
parent
dd7337c84f
commit
1f123b783c
@ -87,20 +87,23 @@ static void OnLateUpdate()
|
|||||||
{
|
{
|
||||||
switch (entry.type)
|
switch (entry.type)
|
||||||
{
|
{
|
||||||
|
// add [Thread#] prefix to make it super obvious where this log message comes from.
|
||||||
|
// some projects may see unexpected messages that were previously hidden,
|
||||||
|
// since Unity wouldn't log them without ThreadLog.cs.
|
||||||
case LogType.Log:
|
case LogType.Log:
|
||||||
Debug.Log($"[T{entry.threadId}] {entry.message}\n{entry.stackTrace}");
|
Debug.Log($"[Thread{entry.threadId}] {entry.message}\n{entry.stackTrace}");
|
||||||
break;
|
break;
|
||||||
case LogType.Warning:
|
case LogType.Warning:
|
||||||
Debug.LogWarning($"[T{entry.threadId}] {entry.message}\n{entry.stackTrace}");
|
Debug.LogWarning($"[TThread{entry.threadId}] {entry.message}\n{entry.stackTrace}");
|
||||||
break;
|
break;
|
||||||
case LogType.Error:
|
case LogType.Error:
|
||||||
Debug.LogError($"[T{entry.threadId}] {entry.message}\n{entry.stackTrace}");
|
Debug.LogError($"[TThread{entry.threadId}] {entry.message}\n{entry.stackTrace}");
|
||||||
break;
|
break;
|
||||||
case LogType.Exception:
|
case LogType.Exception:
|
||||||
Debug.LogError($"[T{entry.threadId}] {entry.message}\n{entry.stackTrace}");
|
Debug.LogError($"[TThread{entry.threadId}] {entry.message}\n{entry.stackTrace}");
|
||||||
break;
|
break;
|
||||||
case LogType.Assert:
|
case LogType.Assert:
|
||||||
Debug.LogAssertion($"[T{entry.threadId}] {entry.message}\n{entry.stackTrace}");
|
Debug.LogAssertion($"[TThread{entry.threadId}] {entry.message}\n{entry.stackTrace}");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user