logging tweaks
This commit is contained in:
@@ -155,12 +155,20 @@ func (c *CronTask) AddVmToInventory(vmObject *mo.VirtualMachine, vc *vcenter.Vce
|
|||||||
rpName, err := vc.GetVmResourcePool(*vmObject)
|
rpName, err := vc.GetVmResourcePool(*vmObject)
|
||||||
|
|
||||||
// Get VM's host and use that to determine cluster
|
// 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)
|
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)
|
c.Logger.Debug("cluster", "name", clusterName)
|
||||||
|
}
|
||||||
|
|
||||||
dcName, err := vc.GetDatacenterForVM(*vmObject)
|
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)
|
c.Logger.Debug("dc", "name", dcName)
|
||||||
|
}
|
||||||
|
|
||||||
if foundVmConfig {
|
if foundVmConfig {
|
||||||
c.Logger.Debug("Adding to Inventory table", "vm_name", vmObject.Name, "vcpus", numVcpus, "ram", numRam)
|
c.Logger.Debug("Adding to Inventory table", "vm_name", vmObject.Name, "vcpus", numVcpus, "ram", numRam)
|
||||||
|
@@ -35,7 +35,7 @@ func (h *Handler) EncryptData(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
h.Logger.Debug("successfully decoded JSON")
|
h.Logger.Debug("successfully decoded JSON")
|
||||||
prettyPrint(input)
|
//prettyPrint(input)
|
||||||
}
|
}
|
||||||
|
|
||||||
//cipher, err := h.Secret.Encrypt()
|
//cipher, err := h.Secret.Encrypt()
|
||||||
|
Reference in New Issue
Block a user