netmaker
netmaker copied to clipboard
[Bug]: Windows application event log has the same Event ID (0) for all netclient events
Contact Details
What happened?
I was trying to write a Task Scheduler event to remap DNS whenever netclient restarts, or does a pull. However, all the event log IDs are 0, meaning that the DNS will be set against an unstable adapter entry. Having specific event log IDs for connections and disconnections would be helpful for this, and for debugging in general. Thanks!
Version
v0.22.0
What OS are you using?
Windows
Relevant log output
No response
Contributing guidelines
- [X] Yes, I did.
I found one workaround for determining when the network's been reset: an Time Service event 37 gets triggered whenever the network changes; at least for machines on a domain.
@unquietwiki , currently Windows client does not manage the service by itself, but it's delegated to Winsw. The event log(start, stop) is written by Winsw, not by netclient code. I raised a git issue https://github.com/winsw/winsw/issues/1078 let's see if it's possible to improve in Winsw level.
Thank you @yabinma for looking into this, and opening that request. It's appreciated!