fix: refine editor console logging
This commit is contained in:
@@ -1,20 +1,34 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace XCEngine
|
||||
{
|
||||
public static class Debug
|
||||
{
|
||||
public static void Log(string message)
|
||||
public static void Log(
|
||||
string message,
|
||||
[CallerFilePath] string file = "",
|
||||
[CallerLineNumber] int line = 0,
|
||||
[CallerMemberName] string member = "")
|
||||
{
|
||||
InternalCalls.Debug_Log(message ?? string.Empty);
|
||||
InternalCalls.Debug_Log(message ?? string.Empty, file ?? string.Empty, line, member ?? string.Empty);
|
||||
}
|
||||
|
||||
public static void LogWarning(string message)
|
||||
public static void LogWarning(
|
||||
string message,
|
||||
[CallerFilePath] string file = "",
|
||||
[CallerLineNumber] int line = 0,
|
||||
[CallerMemberName] string member = "")
|
||||
{
|
||||
InternalCalls.Debug_LogWarning(message ?? string.Empty);
|
||||
InternalCalls.Debug_LogWarning(message ?? string.Empty, file ?? string.Empty, line, member ?? string.Empty);
|
||||
}
|
||||
|
||||
public static void LogError(string message)
|
||||
public static void LogError(
|
||||
string message,
|
||||
[CallerFilePath] string file = "",
|
||||
[CallerLineNumber] int line = 0,
|
||||
[CallerMemberName] string member = "")
|
||||
{
|
||||
InternalCalls.Debug_LogError(message ?? string.Empty);
|
||||
InternalCalls.Debug_LogError(message ?? string.Empty, file ?? string.Empty, line, member ?? string.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user