umputun/docker-logger

Should the programm compile at windows?

Closed this issue · 3 comments

vblz commented

Currently, this project can't be compiled at windows cause no syslog module available at this operating system. https://github.com/golang/go/blob/master/src/log/syslog/syslog.go#L5

Now time the easiest way is comment syslog import and usage. As options, it is available to make syslog disabled for windows with compiler directives as I think.

I have never tried to compile it on windows. Theoretically, syslog functionality it uses (UDP dial to remote host) should not be affected by OS, however, it looks like log/syslog doesn't agree with me. We have 3 possible solutions:

  1. address it with conditional builds and disable syslog support on windows
  2. switch to another syslog client library supporting windows
  3. ignore the issue and add to README information about "not windows compatible"

The best solution will be 2, however, I have no clue if some decent syslog client libs even exist. Solution 1 is less desirable but acceptable too.

If you want to take care of this - PRs are welcome ;)

vblz commented

There is some kind of mix of 1 and 2 options https://github.com/hashicorp/go-syslog from hashicorp. But I some confused cause there are no updates for 2 years except switching to go mod. But the other side they use it in consul, so I think this is the best way.

I wouldn't worry about updates. Not much to update/improve in syslog client area anyway.