This commit is contained in:
2024-04-25 22:05:17 +02:00
parent 44468ae920
commit 6c48b43a20
41 changed files with 2276 additions and 2515 deletions

View File

@@ -1,27 +1,26 @@
using System.Diagnostics;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using System.Diagnostics;
namespace EonaCat.Logger.Web.Pages
namespace EonaCat.Logger.Web.Pages;
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
[IgnoreAntiforgeryToken]
public class ErrorModel : PageModel
{
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
[IgnoreAntiforgeryToken]
public class ErrorModel : PageModel
private readonly ILogger<ErrorModel> _logger;
public ErrorModel(ILogger<ErrorModel> logger)
{
public string? RequestId { get; set; }
_logger = logger;
}
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
public string? RequestId { get; set; }
private readonly ILogger<ErrorModel> _logger;
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
public ErrorModel(ILogger<ErrorModel> logger)
{
_logger = logger;
}
public void OnGet()
{
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
}
public void OnGet()
{
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
}
}