Example #1
0
 /// <summary>
 /// 記錄 Error log
 /// </summary>
 /// <param name="ex">例外物件</param>
 /// <param name="log_type">記錄分類</param>
 /// <param name="save_path">記錄路徑</param>
 public static void Error(string msg, string actionName = "", string csName = "")
 {
     LogTool.SaveLogMessage(msg, "Error", actionName, csName);
 }
Example #2
0
        /// <summary>
        /// 記錄 Error log
        /// </summary>
        /// <param name="ex">例外物件</param>
        /// <param name="log_type">記錄分類</param>
        /// <param name="save_path">記錄路徑</param>
        public static void Error(Exception ex, string actionName = "", string csName = "")
        {
            string save_message = ex.Message.ToString() + "\n" + ex.StackTrace.ToString();

            LogTool.SaveLogMessage(save_message, "Error", actionName, csName);
        }
Example #3
0
 /// <summary>
 /// 記錄 Info log
 /// </summary>
 /// <param name="msg">例外物件</param>
 /// <param name="log_type">記錄分類</param>
 /// <param name="save_path">記錄路徑</param>
 public static void Info(string msg, string actionName = "", string csName = "")
 {
     LogTool.SaveLogMessage(msg, "Info", actionName, csName);
 }
Example #4
0
 /// <summary>
 /// 記錄 Debug log
 /// </summary>
 /// <param name="msg">例外物件</param>
 /// <param name="log_type">記錄分類</param>
 /// <param name="save_path">記錄路徑</param>
 public static void Debug(string msg, string actionName = "", string csName = "")
 {
     LogTool.SaveLogMessage(msg, "Debug", actionName, csName);
 }
Example #5
0
 /// <summary>
 /// 記錄 Fatal log
 /// </summary>
 /// <param name="msg">例外物件</param>
 /// <param name="log_type">記錄分類</param>
 /// <param name="save_path">記錄路徑</param>
 public static void Fatal(string msg, string actionName = "", string csName = "")
 {
     LogTool.SaveLogMessage(msg, "Fatal", actionName, csName);
 }
Example #6
0
 /// <summary>
 /// 記錄 Warn log
 /// </summary>
 /// <param name="msg">例外物件</param>
 /// <param name="log_type">記錄分類</param>
 /// <param name="save_path">記錄路徑</param>
 public static void Warn(string msg, string actionName = "", string csName = "")
 {
     LogTool.SaveLogMessage(msg, "Warn", actionName, csName);
 }