Skip to content

Commit

Permalink
logging tweaks in 'zrok share reserved --agent' (#463)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelquigley committed Sep 17, 2024
1 parent df65230 commit 7244bda
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions cmd/zrok/shareReserved.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ func (cmd *shareReservedCommand) run(_ *cobra.Command, args []string) {
}

if resp.Payload.BackendMode != "socks" {
logrus.Infof("sharing target: '%v'", target)
if !cmd.agent {
logrus.Infof("sharing target: '%v'", target)
}

if resp.Payload.BackendProxyEndpoint != target {
upReq := share.NewUpdateShareParams()
Expand All @@ -114,9 +116,13 @@ func (cmd *shareReservedCommand) run(_ *cobra.Command, args []string) {
}
panic(err)
}
logrus.Infof("updated backend target to: %v", target)
if !cmd.agent {
logrus.Infof("updated backend target to: %v", target)
}
} else {
logrus.Infof("using existing backend target: %v", target)
if !cmd.agent {
logrus.Infof("using existing backend target: %v", target)
}
}
}

Expand Down

0 comments on commit 7244bda

Please sign in to comment.