예제 #1
0
		public async static void Log(ErrorLevel level, Exception e = null, string message = null)
		{
			ErrorLog log;
			if (e != null)
				log = new ErrorLog(e, message);
			else if (message != null)
				log = new ErrorLog(message);
			else
				throw new ArgumentException("Both parameters cannot be null!", "e");

			await ExternalApi.Post<bool>(ConfigUtilities.GetString("ErrorLogUrl"), log);
		}
예제 #2
0
 //POST: /api/ErrorApi
 public void Post(ErrorLog log)
 {
     using (var db = new VideoQuizRepository<ErrorLog>())
         db.Add(log);
 }