Currently we log to the Event Log if the run subcommand fails under Windows. This has been useful in capturing errors from the Windows Service Manager. We should add this same logging to the install, uninstall, and enroll sub-commands. These commands can often be run from DevOps software that make it hard to capture the error.
Code similar to
|
logExternal(fmt.Sprintf("%s run failed: %s", paths.BinaryName, err)) |
should be added to
install and
uninstall