Created
April 26, 2021 14:17
-
-
Save pichayean/de0b94753f62b714229277119fc847b1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Extensions.Logging; | |
namespace Webapi_Serilog.Controllers | |
{ | |
[ApiController] | |
[Route("[controller]")] | |
public class KibanaLogController : ControllerBase | |
{ | |
private readonly ILogger<KibanaLogController> _logger; | |
public KibanaLogController(ILogger<KibanaLogController> logger) | |
{ | |
_logger = logger; | |
} | |
[HttpGet] | |
[Route("CreateInformationLog")] | |
public IActionResult Get() | |
{ | |
_logger.LogInformation("_Log Testing {date}", DateTime.UtcNow); | |
return Ok(new { status = "Hello" }); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment