Beispiel #1
0
        public void Log(string errorType, string msg, string location, ErrorLevel level)
        {
            try
            {
                if (!this.enabled)
                {
                    return;
                }

                int lev = int.Parse(EnumDescription.GetFieldTag(level).ToString());
                if (lev < this.logLevel)
                {
                    return;
                }

                string ss = string.Format("\n{0} : {1} -- {2} 。错误类型:{3}。位置:{4}", DateTime.Now.ToString(), EnumDescription.GetFieldText(level), msg, errorType, location);
                this.FileLogger.Log(ss);
            }
            catch (Exception ee)
            {
                ee = ee;
            }
        }