Beispiel #1
0
        static void Internal_LogError(string msg, LogColor logColor = LogColor.Red)
        {
            if (EnableTime)
            {
                DateTime now = DateTime.Now;
                msg = now.ToString("HH:mm:ss.fff") + " " + msg;
            }

            if (console is UnityDebugerConsole && EnableColor)
            {
                msg = string.Format("<color=#{0}>{1}</color>", colors[logColor], msg);
            }

            if (console != null)
            {
                console.LogError(msg);
            }
            else
            {
                var old = Console.ForegroundColor;
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine(msg);
                Console.ForegroundColor = old;
            }

            LogToFile(" [E]: " + msg, true);
        }
Beispiel #2
0
 private static void Internal_LogError(string msg, object context = null)
 {
     if (m_console != null)
     {
         m_console.LogError(msg, context);
     }
     else
     {
         Console.WriteLine(msg);
     }
 }
Beispiel #3
0
        private static void Internal_LogError(string msg)
        {
            if (Debuger.EnableTime)
            {
                DateTime now = DateTime.Now;
                msg = now.ToString("HH:mm:ss.fff") + " " + msg;
            }

            if (m_console == null)
            {
                m_console = new NativeLogConsole();
            }

            m_console.LogError(msg);

            LogToFile("[E]" + msg, true);
        }
        public static void Internal_LogError(string msg, object context = null)
        {
            if (Debuger.EnableTime)
            {
                DateTime now = DateTime.Now;
                msg = now.ToString("HH:mm:ss.fff") + " " + msg;
            }

            if (m_console != null)
            {
                m_console.LogError(msg, context);
            }
            else
            {
                var old = Console.ForegroundColor;
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine(msg);
                Console.ForegroundColor = old;
            }

            LogToFile("[E]" + msg, true);
        }