Exemple #1
0
        public static void WriteMsg(MessageType degree, object obj, string strMsg, string strMark = "", Exception ex = null)
        {
            string strKey = (obj != null ? obj.GetType().FullName : "") + (string.IsNullOrEmpty(strMark) ? "" : "  Mark:" + strMark);

            switch (degree)
            {
            case MessageType.DEBUG:
                logNet.WriteDebug(strKey, strMsg);
                break;

            case MessageType.ERROR:
                logNet.WriteError(strKey, strMsg);
                break;

            case MessageType.FATAL:
                logNet.WriteFatal(strKey, strMsg);
                break;

            case MessageType.INFO:
                logNet.WriteInfo(strKey, strMsg);
                break;

            case MessageType.NONE:
                logNet.WriteDescrition(strMsg);
                break;

            case MessageType.WARN:
                logNet.WriteWarn(strKey, strMsg);
                break;

            case MessageType.EXCEPTION:
                logNet.WriteException(strKey, ex);
                break;
            }
        }
Exemple #2
0
 private void button6_Click(object sender, EventArgs e)
 {
     logNet.WriteDescrition("这是一条注释");
 }