[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 03/30] Replace printf with logging macros



---
 src/node_device/node_device_hal.c         |    2 +-
 src/nwfilter/nwfilter_ebiptables_driver.c |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/node_device/node_device_hal.c b/src/node_device/node_device_hal.c
index 4bf445d..0174794 100644
--- a/src/node_device/node_device_hal.c
+++ b/src/node_device/node_device_hal.c
@@ -836,7 +836,7 @@ static int halDeviceMonitorReload(void)
     dbus_error_init(&err);
     udi = libhal_get_all_devices(hal_ctx, &num_devs, &err);
     if (udi == NULL) {
-        fprintf(stderr, "%s: libhal_get_all_devices failed\n", __FUNCTION__);
+        VIR_ERROR0("libhal_get_all_devices failed");
         return -1;
     }
     for (i = 0; i < num_devs; i++) {
diff --git a/src/nwfilter/nwfilter_ebiptables_driver.c b/src/nwfilter/nwfilter_ebiptables_driver.c
index cffe027..cdfb92e 100644
--- a/src/nwfilter/nwfilter_ebiptables_driver.c
+++ b/src/nwfilter/nwfilter_ebiptables_driver.c
@@ -2106,9 +2106,9 @@ ebiptablesDisplayRuleInstance(virConnectPtr conn ATTRIBUTE_UNUSED,
                               void *_inst)
 {
     ebiptablesRuleInstPtr inst = (ebiptablesRuleInstPtr)_inst;
-    printf("Command Template: %s\nNeeded protocol: %s\n\n",
-           inst->commandTemplate,
-           virNWFilterChainSuffixTypeToString(inst->neededProtocolChain));
+    VIR_INFO("Command Template: '%s', Needed protocol: '%s'",
+             inst->commandTemplate,
+             virNWFilterChainSuffixTypeToString(inst->neededProtocolChain));
     return 0;
 }
 
-- 
1.6.3.3


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]