From 13e4f708b08d222ae6aa17d10a556bb02a6f1d0d Mon Sep 17 00:00:00 2001 From: Hare Sudhan Date: Wed, 8 Nov 2023 11:11:46 -0500 Subject: [PATCH] Update Syslog-ExecutionLogger.psm1 Most Log Collectors expect single line JSON values. So omitting whitespace in Syslog-ExecutionLogger --- Public/Syslog-ExecutionLogger.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Public/Syslog-ExecutionLogger.psm1 b/Public/Syslog-ExecutionLogger.psm1 index 223b609..d87c925 100644 --- a/Public/Syslog-ExecutionLogger.psm1 +++ b/Public/Syslog-ExecutionLogger.psm1 @@ -25,7 +25,7 @@ function Write-ExecutionLog($startTime, $stopTime, $technique, $testNum, $testNa # send syslog message if a syslog server is defined in Public/config.ps1 if ([bool]$artConfig.syslogServer -and [bool]$artConfig.syslogPort) { - $jsonMsg = $msg | ConvertTo-Json + $jsonMsg = $msg | ConvertTo-Json -Compress Send-SyslogMessage -Server $artConfig.syslogServer -Port $artConfig.syslogPort -Message $jsonMsg -Severity "Informational" -Facility "daemon" -Transport $artConfig.syslogProtocol } }