Beispiel #1
0
        static void Internal_LogWarning(string msg, LogColor logColor = LogColor.Yellow)
        {
            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.LogWarning(msg);
            }
            else
            {
                var old = Console.ForegroundColor;
                Console.ForegroundColor = ConsoleColor.White;
                Console.WriteLine(msg);
                Console.ForegroundColor = old;
            }

            LogToFile(" [W]: " + msg);
        }
Beispiel #2
0
 private static void Internal_LogWarning(string msg, object context = null)
 {
     if (m_console != null)
     {
         m_console.LogWarning(msg, context);
     }
     else
     {
         Console.WriteLine(msg);
     }
 }
Beispiel #3
0
        private static void Internal_LogWarning(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.LogWarning(msg);

            LogToFile("[W]" + msg);
        }
        public static void Internal_LogWarning(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.LogWarning(msg, context);
            }
            else
            {
                var old = Console.ForegroundColor;
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.WriteLine(msg);
                Console.ForegroundColor = old;
            }

            LogToFile("[W]" + msg);
        }