logging tweaks in 'zrok share reserved --agent' (#463)

This commit is contained in:
Michael Quigley 2024-09-17 13:12:59 -04:00
parent df65230cb2
commit 7244bda520
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62

View File

@ -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()
@ -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)
}
}
}