Skip to content

Commit

Permalink
configurable syslog logger protocol (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
clr2of8 authored Aug 9, 2023
1 parent 41ea52a commit 8205472
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Public/Syslog-ExecutionLogger.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,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
Send-SyslogMessage -Server $artConfig.syslogServer -Port $artConfig.syslogPort -Message $jsonMsg -Severity "Informational" -Facility "daemon"
Send-SyslogMessage -Server $artConfig.syslogServer -Port $artConfig.syslogPort -Message $jsonMsg -Severity "Informational" -Facility "daemon" -Transport $artConfig.syslogProtocol
}
}

Expand Down
1 change: 1 addition & 0 deletions Public/config.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ $artConfig = [PSCustomObject]@{
# [optional] Syslog configuration, default execution logs will be sent to this server:port
syslogServer = '' # set to empty string '' if you don't want to log atomic execution details to a syslog server (don't includle http(s):\\)
syslogPort = 514
syslogProtocol = 'UDP' # options are UDP, TCP, TCPwithTLS

verbose = $true; # set to true for more log output

Expand Down

0 comments on commit 8205472

Please sign in to comment.