Skip to content

Commit ba3f5eb

Browse files
committed
fix: ensure cli logger is used for independent c8y clients as well
1 parent d763bd2 commit ba3f5eb

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

pkg/cmd/devices/enroll/enroll.manual.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ func (n *DeviceEnrollCmd) RunE(cmd *cobra.Command, args []string) error {
135135
if err != nil {
136136
return err
137137
}
138-
_ = llog
138+
c8y.Logger = llog
139139

140140
c8yclient, err := n.factory.Client()
141141
if err != nil {

pkg/cmd/sessions/create/create.manual.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ func (n *CmdCreate) promptArgs(cmd *cobra.Command, args []string) error {
174174
if err != nil {
175175
return err
176176
}
177+
c8y.Logger = log
177178
prompter := prompt.NewPrompt(log)
178179

179180
if !cmd.Flags().Changed("host") {

pkg/cmd/sessions/login/login.manual.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,7 @@ func (n *CmdLogin) RunE(cmd *cobra.Command, args []string) error {
401401
if err != nil {
402402
return err
403403
}
404+
c8y.Logger = log
404405

405406
canChangeActiveSession := true
406407
// Warn users if they try to use this command directly

0 commit comments

Comments
 (0)