Rename --log-path back to --log for storagenode-updater (#3391)

This commit is contained in:
Kaloyan Raev 2019-10-28 10:30:27 +02:00 committed by GitHub
parent da2eaa7085
commit b10d444560
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -60,7 +60,7 @@ var (
BinaryLocation string `help:"the storage node executable binary location" default:"storagenode.exe"`
ServiceName string `help:"storage node OS service name" default:"storagenode"`
LogPath string `help:"path to log file, if empty standard output will be used" default:""`
Log string `help:"path to log file, if empty standard output will be used" default:""`
}
confDir string
@ -81,8 +81,8 @@ func init() {
}
func cmdRun(cmd *cobra.Command, args []string) (err error) {
if runCfg.LogPath != "" {
logFile, err := os.OpenFile(runCfg.LogPath, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
if runCfg.Log != "" {
logFile, err := os.OpenFile(runCfg.Log, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
if err != nil {
log.Fatalf("error opening log file: %s", err)
}

View File

@ -57,7 +57,7 @@
Account="[SERVICEACCOUNT]"
Password="[SERVICEPASSWORD]"
ErrorControl="normal"
Arguments="run --config-dir "[INSTALLFOLDER]\" --identity-dir "[IDENTITYDIR]\" --binary-location "[INSTALLFOLDER]\storagenode.exe" --log-path "[INSTALLFOLDER]\storagenode-updater.log""
Arguments="run --config-dir "[INSTALLFOLDER]\" --identity-dir "[IDENTITYDIR]\" --binary-location "[INSTALLFOLDER]\storagenode.exe" --log "[INSTALLFOLDER]\storagenode-updater.log""
/>
<ServiceControl Id="StoragenodeUpdaterStartService" Start="install" Stop="both" Remove="uninstall" Name="storagenode-updater" Wait="yes" />
</Component>