public static void Print( string message, int logLevel = 0, TaleWorlds.Library.Debug.DebugColor color = TaleWorlds.Library.Debug.DebugColor.White, ulong debugFilter = 17592186044416) { if (MBDebug.DisableLogging) { return; } debugFilter &= 18446744069414584320UL; if (debugFilter == 0UL) { return; } try { if (EngineApplicationInterface.IDebug == null) { return; } EngineApplicationInterface.IDebug.WriteLine(logLevel, message, (int)color, debugFilter); } catch { } }
public void Print(string message, int logLevel = 0, TaleWorlds.Library.Debug.DebugColor color = TaleWorlds.Library.Debug.DebugColor.White, ulong debugFilter = 17592186044416) { switch (logLevel) { default: Trace.TraceError($"LEVEL{logLevel}: {message}"); break; case 1: // errors Trace.TraceError(message); break; case 2: // warnings Trace.TraceWarning(message); break; case 3: // info Trace.TraceInformation(message); break; case 4: // debug Trace.TraceInformation($"DEBUG: {message}"); break; } }
public static void ConsolePrint(string message, TaleWorlds.Library.Debug.DebugColor color = TaleWorlds.Library.Debug.DebugColor.White, ulong debugFilter = 17592186044416) { try { EngineApplicationInterface.IDebug.WriteLine(0, message, (int)color, debugFilter); } catch { } }
static bool Prefix(ref string message, int logLevel, TaleWorlds.Library.Debug.DebugColor color, ulong debugFilter) { DebugManager.Print(message, logLevel, color, debugFilter); return(false); }