This is a sample project where a client is used to send syslog messages to a syslog server. The objective is to explore the Go standard syslog library and the Docker syslog log driver.
The following is a list of syslog API that the client uses to send different message types to the server:
- syslog.Alert
- syslog.Crit
- syslog.Debug
- syslog.Emerg
- syslog.Err
- syslog.Info
- syslog.Notice
- syslog.Warning
To build and run the syslog server docker container:
$ docker build --rm -t isim/go-syslog .
$ docker run --rm -p 10154:10154 isim/go-syslog
To build and run the client Docker container:
$ docker build --rm -t isim/gosyslog-client .
$ docker run --rm isim/gosyslog-client
The log emitter script can be used to generate a continuous stream of logs that is sent to the syslog server using the Docker syslog log driver.
$ client/emit_logs.sh
Refer the LICENSE file.