Пример #1
0
        public static void SetMessageDegree(int nDegree)
        {
            switch (nDegree)
            {
            case 0:
                logNet.SetMessageDegree(HslMessageDegree.DEBUG);    //所有等级存储
                break;

            case 1:
                logNet.SetMessageDegree(HslMessageDegree.INFO);    //除DEBUG外,都存储
                break;

            case 2:
                logNet.SetMessageDegree(HslMessageDegree.WARN);    //除DEBUG和INFO外,都存储
                break;

            case 3:
                logNet.SetMessageDegree(HslMessageDegree.ERROR);    //只存储ERROR和FATAL
                break;

            case 4:
                logNet.SetMessageDegree(HslMessageDegree.FATAL);    //只存储FATAL
                break;

            case 5:
                logNet.SetMessageDegree(HslMessageDegree.None);    //不存储任何等级
                break;
            }
        }