From 4ecf486095b313d28e18d1df18d4276cbbfc6cf4 Mon Sep 17 00:00:00 2001 From: "jozsef.b@aycode.com" <9Rj@D}fVwBaN> Date: Sun, 19 May 2024 08:05:31 +0200 Subject: [PATCH] fixes --- TIAMSharedUI/Shared/MainLayout.razor | 6 +++--- TIAMWebApp/Shared/Utility/BrowserConsoleLogWriter.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/TIAMSharedUI/Shared/MainLayout.razor b/TIAMSharedUI/Shared/MainLayout.razor index 6448e7bc..931ed968 100644 --- a/TIAMSharedUI/Shared/MainLayout.razor +++ b/TIAMSharedUI/Shared/MainLayout.razor @@ -77,10 +77,10 @@ } catch (Exception loggerException) { - jsRuntime.InvokeVoidAsync("console.error", $"{nameof(MainLayout)}->HandleError; Logger error! {loggerException.Message}"); + jsRuntime.InvokeVoidAsync("console.error", $"{nameof(MainLayout)}->HandleError; Logger error! {loggerException}"); - jsRuntime.InvokeVoidAsync("console.error", $"{nameof(MainLayout)}->{memberName}; An error occurred: {exception.Message}"); - jsRuntime.InvokeVoidAsync("console.warn", $"{nameof(MainLayout)}->{memberName}; Error details: {exception.StackTrace}"); + jsRuntime.InvokeVoidAsync("console.error", $"{nameof(MainLayout)}->{memberName}; An error occurred: {exception}"); + //jsRuntime.InvokeVoidAsync("console.warn", $"{nameof(MainLayout)}->{memberName}; Error details: {exception.StackTrace}"); } // Log the error to server diff --git a/TIAMWebApp/Shared/Utility/BrowserConsoleLogWriter.cs b/TIAMWebApp/Shared/Utility/BrowserConsoleLogWriter.cs index cfb634e6..3d4788d9 100644 --- a/TIAMWebApp/Shared/Utility/BrowserConsoleLogWriter.cs +++ b/TIAMWebApp/Shared/Utility/BrowserConsoleLogWriter.cs @@ -36,7 +36,7 @@ public class BrowserConsoleLogWriter : AcTextLogWriterBase, IAcLogWriterClientBa protected override void WriteText(string? logText, LogLevel logLevel) { - _jsRuntime.InvokeVoidAsync(_invokeConsoleNames[logLevel], logText); + _jsRuntime.InvokeVoidAsync(_invokeConsoleNames[logLevel], logText); //logText?.Replace(Environment.NewLine, "
")); } //public void Info(string message)