From 96044f7d94301935541ba9b23826369d84ff8754 Mon Sep 17 00:00:00 2001 From: Daniel Trebbien Date: Sat, 5 Mar 2011 00:02:43 -0600 Subject: [PATCH] ifupdown: use new logging API --- src/settings/plugins/ifupdown/Makefile.am | 2 ++ src/settings/plugins/ifupdown/plugin.c | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/settings/plugins/ifupdown/Makefile.am b/src/settings/plugins/ifupdown/Makefile.am index 1bbcc19282..9f9d021821 100644 --- a/src/settings/plugins/ifupdown/Makefile.am +++ b/src/settings/plugins/ifupdown/Makefile.am @@ -1,6 +1,7 @@ SUBDIRS=. tests INCLUDES = \ + -I$(top_srcdir)/src/logging \ -I$(top_srcdir)/src/settings \ -I$(top_srcdir)/include \ -I$(top_srcdir)/libnm-glib \ @@ -44,6 +45,7 @@ libnm_settings_plugin_ifupdown_la_CPPFLAGS = \ libnm_settings_plugin_ifupdown_la_LDFLAGS = -module -avoid-version libnm_settings_plugin_ifupdown_la_LIBADD = \ $(top_builddir)/libnm-util/libnm-util.la \ + $(top_builddir)/src/logging/libnm-logging.la \ libifupdown-io.la \ $(GLIB_LIBS) \ $(GMODULE_LIBS) \ diff --git a/src/settings/plugins/ifupdown/plugin.c b/src/settings/plugins/ifupdown/plugin.c index 9944546cb5..01de78b384 100644 --- a/src/settings/plugins/ifupdown/plugin.c +++ b/src/settings/plugins/ifupdown/plugin.c @@ -48,7 +48,7 @@ #include "parser.h" #include "nm-inotify-helper.h" -#include +#include "nm-logging.h" #include @@ -460,7 +460,7 @@ SCPluginIfupdown_init (NMSystemConfigInterface *config) priv->conf_file, G_KEY_FILE_NONE, &error)) { - nm_info ("loading system config file (%s) caused error: (%d) %s", + nm_log_info (LOGD_SETTINGS, "loading system config file (%s) caused error: (%d) %s", priv->conf_file, error ? error->code : -1, error && error->message ? error->message : "(unknown)"); @@ -473,7 +473,7 @@ SCPluginIfupdown_init (NMSystemConfigInterface *config) IFUPDOWN_KEY_FILE_KEY_MANAGED, &error); if (error) { - nm_info ("getting keyfile key '%s' in group '%s' failed: (%d) %s", + nm_log_info (LOGD_SETTINGS, "getting keyfile key '%s' in group '%s' failed: (%d) %s", IFUPDOWN_KEY_FILE_GROUP, IFUPDOWN_KEY_FILE_KEY_MANAGED, error ? error->code : -1, @@ -595,7 +595,7 @@ update_system_hostname(NMInotifyHelper *inotify_helper, &hostname_file, &hostname_file_len, &error)) { - nm_warning ("update_system_hostname() - couldn't read " + nm_log_warn (LOGD_SETTINGS, "update_system_hostname() - couldn't read " IFUPDOWN_SYSTEM_HOSTNAME_FILE " (%d/%s)", error->code, error->message); return; @@ -629,7 +629,7 @@ write_system_hostname(NMSystemConfigInterface *config, newhostname, -1, &error)) { - nm_warning ("update_system_hostname() - couldn't write hostname (%s) to " + nm_log_warn (LOGD_SETTINGS, "update_system_hostname() - couldn't write hostname (%s) to " IFUPDOWN_SYSTEM_HOSTNAME_FILE " (%d/%s)", newhostname, error->code, error->message); } else {