serilog test
All checks were successful
BuildApp / build-frontend (push) Successful in 1m1s
BuildApp / build-backend (push) Successful in 1m27s

This commit is contained in:
Michał Zieliński
2025-10-21 10:49:24 +02:00
parent 5d33a5a9a5
commit 66b650119b
3 changed files with 21 additions and 3 deletions

View File

@@ -10,10 +10,14 @@ namespace DiunaBI.WebAPI.Controllers;
public class TestsController : Controller
{
private readonly PluginManager _pluginManager;
private readonly ILogger<LayersController> _logger;
public TestsController(
PluginManager pluginManager)
PluginManager pluginManager,
ILogger<LayersController> logger)
{
_pluginManager = pluginManager;
_logger = logger;
}
[HttpGet]
@@ -21,6 +25,18 @@ public class TestsController : Controller
[AllowAnonymous]
public IActionResult Ping()
{
var tmp = new
{
a = 2,
b = "test"
};
var tmp2 = new
{
a = 2,
b = "test"
};
var user = User.Identity;
_logger.LogInformation("LogTest: OldValue {tmp}, NewValue {tmp2}, ChangedBy: {user}", tmp, tmp2, user?.Name);
return Ok("Pong");
}
[HttpGet]