Is there any recursion issue in Application.logMessageReceived?

Hello everyone,

In our project, we use Application.logMessageReceived to capture log messages.

Application.logMessageReceived += LogHandler;

I thought if I invoke Debug.Log(“inside message”) inside LogHandler, the handler itself would be invoked again and a recursion issue would happen. But everything works fine except the “inside message” is missing in the console.

Here are my questions:

  1. Is there any protection for Application.logMessageReceived in UnityEngine?
  2. Why the “inside message” is missing in the console?
  3. Is it guaranteed that invoking Debug.Log, Debug.LogWarning and other log methods doesn’t cause any recursion issue?

Thank you.

I was wondering the same thing. Still no one has posted anything about it in the past two years?!

We just set a boolean while in our handler and early-out to protect against self-recursion.