Add support for capturing stack trace of called DebugLog from C++

This commit is contained in:
Wojtek Figat
2021-02-26 13:58:42 +01:00
parent a45b71617d
commit ff70c16051
5 changed files with 49 additions and 20 deletions

View File

@@ -47,9 +47,16 @@ namespace FlaxEngine
SendLog?.Invoke(logType, message, context, stackTrace);
}
internal static void Internal_SendLog(LogType type, string message)
internal static void Internal_SendLog(LogType logType, string message, string stackTrace)
{
Debug.Logger.Log(type, message);
if (message == null)
return;
var logger = Debug.Logger;
if (logger.IsLogTypeAllowed(logType))
{
Internal_Log(logType, message, IntPtr.Zero, stackTrace);
((DebugLogHandler)logger.LogHandler).SendLog?.Invoke(logType, message, null, stackTrace);
}
}
internal static void Internal_SendLogException(Exception exception)