From 3726d22897a9d7db4473a5d047911c8fbeba09e0 Mon Sep 17 00:00:00 2001 From: terencet Date: Wed, 26 Oct 2016 17:06:58 +1100 Subject: [PATCH] fix an issue where the logs are being written to output with newline. --- .../JsonLogSanitizingFormatter.cs | 2 +- src/SeriLog.LogSanitizingFormatter/project.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SeriLog.LogSanitizingFormatter/JsonLogSanitizingFormatter.cs b/src/SeriLog.LogSanitizingFormatter/JsonLogSanitizingFormatter.cs index 071d09e..e673781 100644 --- a/src/SeriLog.LogSanitizingFormatter/JsonLogSanitizingFormatter.cs +++ b/src/SeriLog.LogSanitizingFormatter/JsonLogSanitizingFormatter.cs @@ -63,7 +63,7 @@ private void Sanitize(LogEvent logEvent, TextWriter output) var jsonObject = JsonConvert.DeserializeObject(tempTextWriter.GetStringBuilder().ToString()); - var processedLogEvent = _processor.Process(jsonObject, _sanitizingFormatRules); + var processedLogEvent = JsonConvert.SerializeObject(_processor.Process(jsonObject, _sanitizingFormatRules)); output.WriteLine(processedLogEvent); } diff --git a/src/SeriLog.LogSanitizingFormatter/project.json b/src/SeriLog.LogSanitizingFormatter/project.json index f55c072..7938e03 100644 --- a/src/SeriLog.LogSanitizingFormatter/project.json +++ b/src/SeriLog.LogSanitizingFormatter/project.json @@ -1,12 +1,12 @@ { "title": "Serilog.LogSanitizingFormatter", - "version": "1.0.0", + "version": "1.0.1", "owners": [ "PageUp" ], "authors": [ "PageUp" ], "description": "A log sanitizing formatter to scrub sensitive data from logs", "projectUrl": "https://github.com/PageUpPeopleOrg/SeriLog.LogSanitizingFormatter", "copyright": "© 2016 PageUp", - "tags": [ "serilog", "logsanitizingformatter", "pageup" ], + "tags": [ "serilog", "logsanitizingformatter", "pageup", "obfuscate", "clean log" ], "buildOptions": { "debugType": "portable" },