Exemplo n.º 1
0
        private static void DoLog(string szMsg, KLogLevel emLevel)
        {
            if (LogLevel > emLevel)
            {
                return;
            }
            szMsg = string.Format("[{0}]{1}\n\n=================================================================\n\n",
                                  DateTime.Now.ToString("HH:mm:ss.ffff"), szMsg);

            switch (emLevel)
            {
            case KLogLevel.Warning:
            case KLogLevel.Trace:
                UnityEngine.Debug.LogWarning(szMsg);
                break;

            case KLogLevel.Error:
                UnityEngine.Debug.LogError(szMsg);
                break;

            default:
                UnityEngine.Debug.Log(szMsg);
                break;
            }
        }
Exemplo n.º 2
0
        private static void DoLog(string szMsg, KLogLevel emLevel)
        {
            if (LogLevel > emLevel)
                return;
            szMsg = string.Format("[{0}]{1}\n\n=================================================================\n\n",
                DateTime.Now.ToString("HH:mm:ss.ffff"), szMsg);

            switch (emLevel)
            {
                case KLogLevel.Warning:
                case KLogLevel.Trace:
                    UnityEngine.Debug.LogWarning(szMsg);
                    break;
                case KLogLevel.Error:
                    UnityEngine.Debug.LogError(szMsg);
                    break;
                default:
                    UnityEngine.Debug.Log(szMsg);
                    break;
            }
        }