Skip to content

Commit

Permalink
Updated README to add syslog instruction, and updated syslog program …
Browse files Browse the repository at this point in the history
…name
  • Loading branch information
racerxdl committed Jan 26, 2018
1 parent ae0ec7b commit 9fb14cf
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
2 changes: 1 addition & 1 deletion RemoteSigner/Log/SyslogClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 9fb14cf

Please sign in to comment.