backends: update logging

This commit is contained in:
Dan Williams 2010-04-07 10:13:44 -07:00
parent 15e32cd4dc
commit 6021761081
6 changed files with 26 additions and 18 deletions

View file

@ -1,9 +1,11 @@
INCLUDES = -I${top_srcdir} \
-I${top_srcdir}/include \
-I${top_srcdir}/src \
-I${top_srcdir}/src/vpn-manager \
-I${top_srcdir}/src/named-manager \
-I${top_srcdir}/libnm-util
INCLUDES = \
-I${top_srcdir} \
-I${top_srcdir}/src/logging \
-I${top_srcdir}/include \
-I${top_srcdir}/src \
-I${top_srcdir}/src/vpn-manager \
-I${top_srcdir}/src/named-manager \
-I${top_srcdir}/libnm-util
noinst_LTLIBRARIES = libnmbackend.la
@ -53,7 +55,11 @@ if TARGET_PARDUS
libnmbackend_la_SOURCES += NetworkManagerPardus.c
endif
libnmbackend_la_LIBADD += $(DBUS_LIBS) $(GLIB_LIBS)
libnmbackend_la_LIBADD += \
$(top_builddir)/src/logging/libnm-logging.la \
$(DBUS_LIBS) \
$(GLIB_LIBS)
libnmbackend_la_CPPFLAGS = \
$(DBUS_CFLAGS) \
$(GLIB_CFLAGS) \

View file

@ -34,7 +34,7 @@
#include "NetworkManagerGeneric.h"
#include "nm-system.h"
#include "NetworkManagerUtils.h"
#include "nm-utils.h"
#include "nm-logging.h"
/*
* nm_system_enable_loopback
@ -57,7 +57,7 @@ void nm_system_enable_loopback (void)
void nm_system_update_dns (void)
{
if (g_file_test ("/usr/sbin/nscd", G_FILE_TEST_IS_EXECUTABLE)) {
nm_info ("Clearing nscd hosts cache.");
nm_log_info (LOGD_DNS, "Clearing nscd hosts cache.");
nm_spawn_process ("/usr/sbin/nscd -i hosts");
}
}

View file

@ -1,3 +1,4 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/* NetworkManager -- Network link manager
*
* Timothee Lecomte <timothee.lecomte@ens.fr>
@ -36,7 +37,7 @@
#include "nm-system.h"
#include "NetworkManagerUtils.h"
#include "nm-netlink.h"
#include "nm-utils.h"
#include "nm-logging.h"
/* Because of a bug in libnl, rtnl.h should be included before route.h */
#include <netlink/route/rtnl.h>
@ -93,8 +94,9 @@ void nm_generic_enable_loopback (void)
rtnl_addr_set_label (addr, "lo");
if ((err = rtnl_addr_add (nlh, addr, 0)) < 0) {
if (err != -EEXIST)
nm_warning ("error %d returned from rtnl_addr_add():\n%s", err, nl_geterror());
if (err != -EEXIST) {
nm_log_warn (LOGD_CORE, "error %d returned from rtnl_addr_add():\n%s", err, nl_geterror());
}
}
out:
if (addr)

View file

@ -34,7 +34,7 @@
#include "NetworkManagerGeneric.h"
#include "nm-system.h"
#include "NetworkManagerUtils.h"
#include "nm-utils.h"
#include "nm-logging.h"
/*
* nm_system_enable_loopback
@ -59,7 +59,7 @@ void nm_system_enable_loopback (void)
void nm_system_update_dns (void)
{
if (g_file_test ("/usr/sbin/nscd", G_FILE_TEST_IS_EXECUTABLE)) {
nm_info ("Clearing nscd hosts cache.");
nm_log_info (LOGD_DNS, "Clearing nscd hosts cache.");
nm_spawn_process ("/usr/sbin/nscd -i hosts");
}
}

View file

@ -33,7 +33,7 @@
#include "NetworkManagerGeneric.h"
#include "nm-system.h"
#include "NetworkManagerUtils.h"
#include "nm-utils.h"
#include "nm-logging.h"
/*
* nm_system_enable_loopback
@ -55,7 +55,7 @@ void nm_system_enable_loopback (void)
*/
void nm_system_update_dns (void)
{
nm_info ("Clearing nscd hosts cache.");
nm_log_info (LOGD_DNS, "Clearing nscd hosts cache.");
nm_spawn_process ("/usr/sbin/nscd -i hosts");
}

View file

@ -34,7 +34,7 @@
#include "NetworkManagerGeneric.h"
#include "nm-system.h"
#include "NetworkManagerUtils.h"
#include "nm-utils.h"
#include "nm-logging.h"
/*
* nm_system_enable_loopback
@ -56,7 +56,7 @@ void nm_system_enable_loopback (void)
*/
void nm_system_update_dns (void)
{
nm_info ("Clearing nscd hosts cache.");
nm_log_info (LOGD_DNS, "Clearing nscd hosts cache.");
nm_spawn_process ("/usr/sbin/nscd -i hosts");
}