Пример #1
0
 private static void AddLogToDB(string exceptionMessage, string stackTrace, SeverityLevel lvl, string customMessage)
 {
     if (lvl >= ApplicationLogLevel)
     {
         var loggerDb = new UtilDatabase();
         loggerDb.AddLog(lvl, exceptionMessage, stackTrace, customMessage);
     }
 }
Пример #2
0
        public ActionResult ShowLogs( string loglevel)
        {
            var db = new UtilDatabase();
              var model = new ShowLogsModel()
              {
            Logs = db.GetAllLogs(loglevel,100)
              };

              db.Cleanup();
              return View(model);
        }
Пример #3
0
 public static void Log(Exception ex, SeverityLevel lvl, string customMessage)
 {
     var loggerDb = new UtilDatabase();
     loggerDb.AddLog(lvl, ex.Message, ex.StackTrace, customMessage);
 }