change logging
This commit is contained in:
@@ -73,9 +73,9 @@ func (h *Handler) VmCreate(w http.ResponseWriter, r *http.Request) {
|
||||
h.Logger.Debug("didn't find VM", "vm_id", vm.CloudEvent.Data.VM.VM.Value)
|
||||
numRam = 0
|
||||
numVcpus = 0
|
||||
datacenter = ""
|
||||
datacenter = vm.CloudEvent.Data.Datacenter.Name
|
||||
} else {
|
||||
h.Logger.Debug("found VM", "object", vmObject)
|
||||
h.Logger.Debug("found VM")
|
||||
//prettyPrint(vmObject)
|
||||
|
||||
// calculate VM properties we want to store
|
||||
@@ -101,6 +101,7 @@ func (h *Handler) VmCreate(w http.ResponseWriter, r *http.Request) {
|
||||
EventKey: sql.NullString{String: strconv.Itoa(vm.CloudEvent.Data.Key), Valid: strconv.Itoa(vm.CloudEvent.Data.Key) != ""},
|
||||
VmId: sql.NullString{String: vm.CloudEvent.Data.VM.VM.Value, Valid: vm.CloudEvent.Data.VM.VM.Value != ""},
|
||||
Datacenter: sql.NullString{String: datacenter, Valid: datacenter != ""},
|
||||
Cluster: sql.NullString{String: vm.CloudEvent.Data.ComputeResource.Name, Valid: vm.CloudEvent.Data.ComputeResource.Name != ""},
|
||||
CreationTime: sql.NullInt64{Int64: unixTimestamp, Valid: unixTimestamp > 0},
|
||||
InitialVcpus: sql.NullInt64{Int64: int64(numVcpus), Valid: numVcpus > 0},
|
||||
InitialRam: sql.NullInt64{Int64: int64(numRam), Valid: numRam > 0},
|
||||
|
Reference in New Issue
Block a user