From 16d9fe3b6091badbaf6e6700073219c5327fe9cd Mon Sep 17 00:00:00 2001 From: HojouFotytu <36724681+HojouFotytu@users.noreply.github.com> Date: Fri, 15 Nov 2019 12:18:43 +0900 Subject: [PATCH] Logger --- Core/Main/PTMagic.cs | 2 -- Monitor/Pages/Error.cshtml | 5 +++++ Monitor/Pages/Error.cshtml.cs | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Core/Main/PTMagic.cs b/Core/Main/PTMagic.cs index 8c3598e..fc5c7ce 100644 --- a/Core/Main/PTMagic.cs +++ b/Core/Main/PTMagic.cs @@ -2323,8 +2323,6 @@ namespace Core.Main } } - this.Log.DoLogInfo("DCA ProfitPercentage Label:" + ProfitPercentageLabel); - // Get configured DCA triggers for (int dca = 1; dca <= maxDCALevel; dca++) { diff --git a/Monitor/Pages/Error.cshtml b/Monitor/Pages/Error.cshtml index 0ea6585..6c83966 100644 --- a/Monitor/Pages/Error.cshtml +++ b/Monitor/Pages/Error.cshtml @@ -13,4 +13,9 @@

Request ID: @Model.RequestId

+} + +@if (Model.Exception != null) { +

@Model.Exception.Error.Message

+

@Model.Exception.Error.StackTrace

} \ No newline at end of file diff --git a/Monitor/Pages/Error.cshtml.cs b/Monitor/Pages/Error.cshtml.cs index f96bf8a..ccf6208 100644 --- a/Monitor/Pages/Error.cshtml.cs +++ b/Monitor/Pages/Error.cshtml.cs @@ -7,11 +7,14 @@ namespace Monitor.Pages public class ErrorModel : PageModel { public string RequestId { get; set; } + public IExceptionHandlerFeature Exception = null; public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); public void OnGet() { + Exception = HttpContext.Features.Get(); + var exceptionFeature = HttpContext.Features.Get(); RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;