示例#1
0
 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;
            }
        }
示例#3
0
 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
     {
     }
 }
示例#4
0
 static bool Prefix(ref string message, int logLevel, TaleWorlds.Library.Debug.DebugColor color, ulong debugFilter)
 {
     DebugManager.Print(message, logLevel, color, debugFilter);
     return(false);
 }