Example #1
0
 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);
     }
 }
Example #2
0
 private static void WriteDatabaseLog(LogParameter lp)
 {
 }
Example #3
0
 private static void WriteShowLog(LogParameter lp)
 {
     Console.WriteLine(lp.Msg);
 }
Example #4
0
 private static void WriteTxtLog(LogParameter lp)
 {
     File.AppendAllText(Config.LogPath, lp.Msg);
 }