Ensure all enum cases are listed in switch statements. This improves
debug logging integration with openwsman.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/hyperv/hyperv_driver.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c
index ee94fd3511..e512b626ea 100644
--- a/src/hyperv/hyperv_driver.c
+++ b/src/hyperv/hyperv_driver.c
@@ -1656,13 +1656,27 @@ hypervDebugHandler(const char *message, debug_level_e level,
switch (level) {
case DEBUG_LEVEL_ERROR:
case DEBUG_LEVEL_CRITICAL:
- VIR_ERROR(_("openwsman error: %s"), message);
+ case DEBUG_LEVEL_ALWAYS:
+ VIR_ERROR(_("openwsman: %s"), message);
break;
case DEBUG_LEVEL_WARNING:
- VIR_WARN("openwsman warning: %s", message);
+ VIR_WARN("openwsman: %s", message);
break;
+ case DEBUG_LEVEL_MESSAGE:
+ VIR_INFO("openwsman: %s", message);
+ break;
+
+ case DEBUG_LEVEL_INFO:
+ VIR_INFO("openwsman: %s", message);
+ break;
+
+ case DEBUG_LEVEL_DEBUG:
+ VIR_DEBUG("openwsman: %s", message);
+ break;
+
+ case DEBUG_LEVEL_NONE:
default:
/* Ignore the rest */
break;
--
2.14.3