public IActionResult LogMessage([FromRoute] int logLevel, [FromBody] LogEntry logEntry) { if (!ModelState.IsValid) { var errors = ModelState.Select(x => x.Value.Errors) .Where(y => y.Count > 0) .ToList(); return(BadRequest(errors)); } _logService.Log(logEntry, (Serilog.Events.LogEventLevel)logLevel); return(Ok()); }
public IActionResult LogMessage([FromRoute] int logLevel, [FromBody] LogEntry logEntry) { _logService.Log(logEntry, (Serilog.Events.LogEventLevel)logLevel); return(Ok()); }