From 9fb14cf5021b3b1aa86185135fa932f4aa639d84 Mon Sep 17 00:00:00 2001 From: Lucas Teske Date: Fri, 26 Jan 2018 04:18:44 -0200 Subject: [PATCH] Updated README to add syslog instruction, and updated syslog program name --- README.md | 22 ++++++++++++++++++++++ RemoteSigner/Log/SyslogClient.cs | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 459d163..caac1fe 100644 --- a/README.md +++ b/README.md @@ -244,3 +244,25 @@ mkbundle -z --static --deps RemoteSigner.exe -L /usr/local/Cellar/mono/5.4.1.6/l This will generate a static binary called RemoteSigner. +Enabling Syslog Support +======================= + +To be able to output to syslog, you need to add UDP support to syslog server. + +Edit the file `/etc/rsyslog.conf` and search for these lines: + +``` +# provides UDP syslog reception +#module(load="imudp") +#input(type="imudp" port="514") +``` + +If you find, uncomment the last two, if you dont find, just add to the end of the file. + +``` +# provides UDP syslog reception +module(load="imudp") +input(type="imudp" port="514") +``` + +Then restart syslog. On Ubuntu: `service rsyslog restart` \ No newline at end of file diff --git a/RemoteSigner/Log/SyslogClient.cs b/RemoteSigner/Log/SyslogClient.cs index fa9fa13..88b2b9b 100644 --- a/RemoteSigner/Log/SyslogClient.cs +++ b/RemoteSigner/Log/SyslogClient.cs @@ -51,7 +51,7 @@ public static void Send(Message message) { if (IsActive) { int priority = (int)FacilityMap[message.Facility] * 8 + message.Level; - string msg = System.String.Format("<{0}>{1} {2} {3}", priority, DateTime.Now.ToString("MMM dd HH:mm:ss"), "XRIT", message.Text); + string msg = System.String.Format("<{0}>{1} {2} {3}", priority, DateTime.Now.ToString("MMM dd HH:mm:ss"), "RemoteSigner", message.Text); byte[] bytes = System.Text.Encoding.ASCII.GetBytes(msg); udpClient.Send(bytes, bytes.Length); }