You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems to be down to how ThreadLog attaches itself as a log-handler for threaded messages in Mirror.ThreadLog.Initialize via Application.logMessageReceivedThreaded += OnLog;
And then pumps the logs out in Mirror.ThreadLog.OnLateUpdate - which is why we're seeing them with Mirror stack-trace alongside out normal threaded logging.
Repro
Create app logger that attaches to Application.logMessageReceivedThreaded += HandleLog;
Add following behaviour
public class UniTaskMirrorTest : MonoBehaviour
{
void Start()
{
Task.Run(() =>
{
Debug.LogError("Test Thread Log");
});
}
}
Build and run
Mirror logger and custom-app logger will print error
Expected behavior
I'd expect Mirror ThreadLog to only log its own messages
Desktop (please complete the following information):
OS: Windows
Build target: Standalone
Unity version: 2022.1.23
Mirror branch: v83.2.1
The text was updated successfully, but these errors were encountered:
We're seeing debug-error messages coming from our app code that have Mirror at the bottom of the stack-trace.
eg.
The messages are also duplicated, we'll also get another one with correct stack trace.
eg.
And mirror will produce
It seems to be down to how
ThreadLog
attaches itself as a log-handler for threaded messages inMirror.ThreadLog.Initialize
viaApplication.logMessageReceivedThreaded += OnLog;
And then pumps the logs out in
Mirror.ThreadLog.OnLateUpdate
- which is why we're seeing them with Mirror stack-trace alongside out normal threaded logging.Repro
Application.logMessageReceivedThreaded += HandleLog;
Expected behavior
I'd expect Mirror ThreadLog to only log its own messages
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: