示例#1
0
        /// <summary>
        /// 创建系统日志
        /// </summary>
        /// <param name="level">级别</param>
        /// <param name="type">类名,可自定义</param>
        /// <param name="parasHashtable">自定义参数,目前固定三个{UserId;IP;FunName}</param>
        /// <param name="message">内容</param>
        public void Log(MsgLevel level, System.String type, Hashtable parasHashtable, object message)
        {
            switch (level)
            {
            case MsgLevel.DEBUG:
                MyLog.Debug(type, parasHashtable, message);
                break;

            case MsgLevel.INFO:
                MyLog.Info(type, parasHashtable, message);
                break;

            case MsgLevel.WARN:
                MyLog.Warn(type, parasHashtable, message);
                break;

            case MsgLevel.ERROR:
                MyLog.Error(type, parasHashtable, message);
                break;

            case MsgLevel.FATAL:
                MyLog.Fatal(type, parasHashtable, message);
                break;
            }
        }
示例#2
0
        /// <summary>
        /// 创建系统日志
        /// </summary>
        /// <param name="level">级别</param>
        /// <param name="type">类名,可自定义</param>
        /// <param name="parasHashtable">自定义参数,目前固定三个{UserId;IP;FunName}</param>
        /// <param name="message">内容</param>
        public void Log(MsgLevel level, System.String type, Hashtable parasHashtable, object message)
        {
            switch (level)
            {
            case MsgLevel.Debug:
                MyLog.Debug(type, parasHashtable, message);
                break;

            case MsgLevel.Info:
                MyLog.Info(type, parasHashtable, message);
                break;

            case MsgLevel.Warn:
                MyLog.Warn(type, parasHashtable, message);
                break;

            case MsgLevel.Error:
                MyLog.Error(type, parasHashtable, message);
                break;

            case MsgLevel.Fatal:
                MyLog.Fatal(type, parasHashtable, message);
                break;
            }
        }