Beispiel #1
0
        /// <summary>
        /// 警告
        /// </summary>
        static public void Warning(string msg)
        {
            if (m_LogLv > eLogLevel.LV_WARNING)
            {
                return;
            }
            if (!m_EnableType[(int)eLogLevel.LV_WARNING])
            {
                return;
            }

            string log = "[warning]" + msg;

            Console.ForegroundColor = ConsoleColor.Yellow;
            Console.WriteLine(log);
            Console.ForegroundColor = ConsoleColor.White;
            if (m_Log2File)
            {
                Log4Helper.Warning(log);
            }
            if (m_MsgFun != null)
            {
                m_MsgFun(log);
            }
        }
Beispiel #2
0
        /// <summary>
        /// 警告
        /// </summary>
        static public void Warning(params string[] msg)
        {
            if (m_LogLv > eLogLevel.LV_WARNING)
            {
                return;
            }
            if (!m_EnableType[(int)eLogLevel.LV_WARNING])
            {
                return;
            }

            tmp_st.Clear();
            for (int i = 0; i < msg.Length; ++i)
            {
                tmp_st = tmp_st.Append(msg[i]);
            }
            string log = "[warning]" + tmp_st.ToString();

            Console.ForegroundColor = ConsoleColor.Yellow;
            Console.WriteLine(log);
            Console.ForegroundColor = ConsoleColor.White;
            if (m_Log2File)
            {
                Log4Helper.Warning(log);
            }
            if (m_MsgFun != null)
            {
                m_MsgFun(log);
            }
        }