update logging
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-27 11:24:12 +10:00
parent c691763430
commit a18cca1f0e

View File

@@ -55,7 +55,7 @@ func (h *Handler) VmModifyEvent(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Processed update event but no config changes were found\n") fmt.Fprintf(w, "Processed update event but no config changes were found\n")
} else { } else {
h.Logger.Debug("Received event contains config change info", "source", event.CloudEvent.Source, h.Logger.Debug("Received event contains config change info", "source", event.CloudEvent.Source,
"chain_id", event.CloudEvent.Data.ChainID, "id", event.CloudEvent.ID,
"vm", event.CloudEvent.Data.VM.Name, "user_name", event.CloudEvent.Data.UserName) "vm", event.CloudEvent.Data.VM.Name, "user_name", event.CloudEvent.Data.UserName)
// Try to decode the config changes data // Try to decode the config changes data
@@ -181,6 +181,8 @@ func (h *Handler) VmModifyEvent(w http.ResponseWriter, r *http.Request) {
return return
} }
} else { } else {
h.Logger.Debug("Didn't find any configuration changes of interest", "id", event.CloudEvent.ID,
"vm", event.CloudEvent.Data.VM.Name, "config_changes", configChanges)
w.WriteHeader(http.StatusAccepted) w.WriteHeader(http.StatusAccepted)
fmt.Fprintf(w, "Processed update event but no config changes were of interest\n") fmt.Fprintf(w, "Processed update event but no config changes were of interest\n")
//prettyPrint(event.CloudEvent.Data.ConfigSpec) //prettyPrint(event.CloudEvent.Data.ConfigSpec)