more debugging
Some checks are pending
CI / Lint (push) Waiting to run
CI / Test (push) Waiting to run
CI / End-to-End (push) Waiting to run
CI / Publish Docker (push) Blocked by required conditions
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-09-13 09:39:13 +10:00
parent f0278388cb
commit 424474f4fd
2 changed files with 19 additions and 7 deletions

View File

@@ -17,7 +17,7 @@ import (
)
type Vcenter struct {
logger *slog.Logger
Logger *slog.Logger
ctx context.Context
client *govmomi.Client
}
@@ -34,7 +34,7 @@ func New(logger *slog.Logger) *Vcenter {
//defer cancel()
return &Vcenter{
logger: logger,
Logger: logger,
ctx: context.Background(),
}
}
@@ -67,7 +67,7 @@ func (v *Vcenter) Login(vUrl string) error {
c, err := govmomi.NewClient(v.ctx, u, insecure)
if err != nil {
v.logger.Error("Unable to connect to vCenter", "error", err)
v.Logger.Error("Unable to connect to vCenter", "error", err)
return fmt.Errorf("unable to connect to vCenter : %s", err)
}
@@ -75,6 +75,8 @@ func (v *Vcenter) Login(vUrl string) error {
v.client = c
v.Logger.Debug("successfully connected to vCenter")
return nil
}