Skip to content

itc-lab/windows-syslogd

Repository files navigation

Syslog Server for Windows

General info

Syslog Server for Windows is a free open source program to receive syslog messages, reads syslog.conf in a Unix compatible format and runs as a Windows service.
Compatible with router and Linux syslog facilities and levels.

Technologies

Project is created with:

  • Visual Studio Community 2019
  • C++ MFC for latest v142-Buildtools (x86 & x64)
  • Windows 10 SDK (10.0.18362.0)
  • Microsoft Visual Studio Installer Projects Extension

Build

Choose options.

Choose options

Clone this repository.

Clone this repository

Add an extension.

Add an extension

Open ntservice.sln.

Open ntservice.sln

Run "Batch Build" as the image below.

Batch Build

Setup

Double-click setup\Release\syslogd.msi to install.

Double-click

Make sure that the "Syslog Server" service is started.

Syslog Server

Edit C:\Program Files (x86)\Common Files\syslogd\syslog.conf.
Warning: Since it cannot be overwritten as it is, copy it to another directory, edit it, and overwrite it.

Edit syslog conf

Usage

Stop the syslogd service and start debugging with cmd.exe.

C:\Program Files (x86)\Common Files\syslogd>syslogd.exe -DEBUG

Enable the 514/UDP port on the firewall.

Enable firewall

By default, the logs are output to the C:\ProgramData\syslogd directory. C:\ProgramData\syslogd directory is created automatically.

syslogd directory

You can use Local System environment variables to set the log output destination. Example:%ProgramData%\%Date%.log

local0.err    %ProgramData%\%Date%.log
syslog conf Example

Stop debugging, start the syslogd service.

syslog.conf

Below is a table of how much the specification is supported compared to FreeBSD's syslog.conf.

Features Support
facility detection
The special facility "mark"
priority level detection
include
Delimiter space / tab
Case insensitive
Comparison flag, equal =
Comparison flag, > < => >= !
program specification
!prog1,prog2
!-prog1,prog2
hostname specification
#+@ or +@
+hostname1,hostname2
-hostname1,hostname2
PROPERTY-BASED FILTERS
Reset filtering
Priority from behind ;semicolon
Comma separated facility
asterisk
none
Semicolon delimiter;Priority from behind
Action - minus sign
Action - @ sign forward host:port, IPv6 ✔(port, IPv6❌)
Action - list of users
Action - vertical bar "|"
Escape #

See also

Windows 版 syslogd サービスを作成した(C++) (Japanese text only)