-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix_edit_field
- Loading branch information
Showing
6 changed files
with
131 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using Blazorise; | ||
using Serilog.Events; | ||
using Serilog.Formatting; | ||
using Serilog.Formatting.Json; | ||
|
||
namespace NodeGuard.Helpers; | ||
|
||
/// <summary> | ||
/// Custom formatter to lowercase the JSON output | ||
/// </summary> | ||
public class LowerCaseJsonFormatter : ITextFormatter | ||
{ | ||
private readonly JsonFormatter _formatter; | ||
|
||
public LowerCaseJsonFormatter() | ||
{ | ||
_formatter = new JsonFormatter(); | ||
} | ||
|
||
public void Format(LogEvent logEvent, TextWriter output) | ||
{ | ||
using var sw = new StringWriter(); | ||
_formatter.Format(logEvent, sw); | ||
var json = sw.ToString().ToLower(); | ||
output.WriteLine(json); | ||
} | ||
} |
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
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
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
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
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