logging tweaks
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-30 10:58:45 +10:00
parent c4eedb55b7
commit 5afbe9bb30
2 changed files with 12 additions and 4 deletions

View File

@@ -155,12 +155,20 @@ func (c *CronTask) AddVmToInventory(vmObject *mo.VirtualMachine, vc *vcenter.Vce
rpName, err := vc.GetVmResourcePool(*vmObject)
// Get VM's host and use that to determine cluster
c.Logger.Debug("Checking for VM host by runtime data", "runtime", vmObject.Runtime)
//c.Logger.Debug("Checking for VM host by runtime data", "runtime", vmObject.Runtime)
clusterName, err = vc.GetClusterFromHost(vmObject.Runtime.Host)
if err != nil {
c.Logger.Error("Unable to determine cluster name", "error", err)
} else {
c.Logger.Debug("cluster", "name", clusterName)
}
dcName, err := vc.GetDatacenterForVM(*vmObject)
if err != nil {
c.Logger.Error("Unable to determine datacenter name", "error", err)
} else {
c.Logger.Debug("dc", "name", dcName)
}
if foundVmConfig {
c.Logger.Debug("Adding to Inventory table", "vm_name", vmObject.Name, "vcpus", numVcpus, "ram", numRam)

View File

@@ -35,7 +35,7 @@ func (h *Handler) EncryptData(w http.ResponseWriter, r *http.Request) {
return
} else {
h.Logger.Debug("successfully decoded JSON")
prettyPrint(input)
//prettyPrint(input)
}
//cipher, err := h.Secret.Encrypt()