public async Task <IActionResult> Delete([FromRoute] string personId) { var command = new Delete.Command(personId); command.SetUserName(User.Identity.Name); var result = await _mediator.Send(command); // Will create a separate log file for the specific date and category, if you want to categorized the logs //Log.Information($"Delete API endpoint was called from {this.GetType().Name} by {User.Identity.Name}" + ",{Name}", this.GetType().Name); Log.Information($"Delete API endpoint was called from {this.GetType().Name} by {User.Identity.Name}" + " | {Name}", this.GetType().Name); return(Ok(result)); }