示例#1
0
文件: Log.cs 项目: JosonJiang/Lisate
 public static void WriteLog(LogParameter lp)
 {
     try
     {
         if (Config.LogLevel <= lp.Level)
         {
             if ((Config.LogType & Config.DataBase_Log) > 0)
             {
                 WriteDatabaseLog(lp);
             }
             if ((Config.LogType & Config.Txt_Log) > 0)
             {
                 WriteTxtLog(lp);
             }
             if ((Config.LogType & Config.Show_Log) > 0)
             {
                 WriteShowLog(lp);
             }
         }
     }
     catch (Exception e)
     {
         Console.WriteLine(e.Message);
         Console.WriteLine(e.StackTrace);
         Console.WriteLine(lp.Msg);
     }
 }
示例#2
0
文件: Log.cs 项目: JosonJiang/Lisate
 private static void WriteDatabaseLog(LogParameter lp)
 {
 }
示例#3
0
文件: Log.cs 项目: JosonJiang/Lisate
 private static void WriteShowLog(LogParameter lp)
 {
     Console.WriteLine(lp.Msg);
 }
示例#4
0
文件: Log.cs 项目: JosonJiang/Lisate
 private static void WriteTxtLog(LogParameter lp)
 {
     File.AppendAllText(Config.LogPath, lp.Msg);
 }