A minimalistic syslog daemon I use when debugging infrastructure, output is similar to papertrail.
Either:
go get github.com/christopherobin/mini-syslog
Or download from the release tab on github and put the binary in your path.
usage: mini-syslog [<flags>]
Mini-Syslog with papertrail-like output
Flags:
--help Show context-sensitive help (also try --help-long and --help-man).
-b, --bind=":1514" What IP:Port to bind to
-p, --protocol=udp Which protocol to use
--color Enable colors
-t, --template=TEMPLATE Override output template
The template system uses go templates and takes the actual syslog message as a map, standards fields provided in the message are:
- content
- tag
- app_name
- proc_id
- msg_id
- structured_data
- client
- severity
- timestamp
- version
- hostname
- message
- priority
- facility
A couple helper functions are also provided:
- severity: Transforms severity integer to colored string
- bold: Makes text bold
- blue: Makes text blue
- gray: Makes text gray
- green: Makes text green
- red: Makes text red
- yellow: Makes text yellow
{{ .timestamp }} [{{ severity .severity }}] {{ yellow .hostname }} {{ or .app_name .tag | blue }}: {{ or .message .content }}
MIT