//////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> Saves the given error log. </summary> /// /// <remarks> Mustafa SAÇLI, 9.05.2019. </remarks> /// /// <param name="errorLog"> The error log to save. </param> /// /// <returns> A string. </returns> //////////////////////////////////////////////////////////////////////////////////////////////////// public string Save(ErrorLogModel errorLog) { var result = string.Empty; try { result = logBusiness.Save(errorLog); } catch (Exception e) { SimpleFileLogger.Instance.LogError(e); result = "err"; } return(result); }
public IHttpActionResult Post([FromBody] ErrorLogModel log) { var result = string.Empty; try { result = logBusiness.Save(log); } catch (Exception e) { this.Logger?.LogError(e); result = "err"; } return(Ok(result)); }