Exemplo n.º 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);
     }
 }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
 public static void Log(Exception ex, SeverityLevel lvl, string customMessage)
 {
     var loggerDb = new UtilDatabase();
     loggerDb.AddLog(lvl, ex.Message, ex.StackTrace, customMessage);
 }