[network-manager-pptp: 11/12] service: use syslog() for logging from pppd-plugin
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-pptp: 11/12] service: use syslog() for logging from pppd-plugin
- Date: Tue, 20 Sep 2016 10:07:20 +0000 (UTC)
commit cb9a0739f70258a878a3e893e6e90acd180bd3e6
Author: Thomas Haller <thaller redhat com>
Date: Mon Sep 19 17:04:30 2016 +0200
service: use syslog() for logging from pppd-plugin
pppd itself uses syslog for logging. The plugin should hook into
the same logging framework by using syslog() too.
src/nm-pptp-pppd-plugin.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/nm-pptp-pppd-plugin.c b/src/nm-pptp-pppd-plugin.c
index 21c2442..1993b8f 100644
--- a/src/nm-pptp-pppd-plugin.c
+++ b/src/nm-pptp-pppd-plugin.c
@@ -60,11 +60,12 @@ struct {
#define _NMLOG(level, ...) \
G_STMT_START { \
if (gl.log_level >= (level)) { \
- g_print ("nm-pptp[%s] %-7s [helper-%ld] " _NM_UTILS_MACRO_FIRST (__VA_ARGS__) "\n", \
- gl.log_prefix_token, \
- nm_utils_syslog_to_str (level), \
- (long) getpid () \
- _NM_UTILS_MACRO_REST (__VA_ARGS__)); \
+ syslog (nm_utils_syslog_coerce_from_nm (level), \
+ "nm-pptp[%s] %-7s [helper-%ld] " _NM_UTILS_MACRO_FIRST (__VA_ARGS__) "\n", \
+ gl.log_prefix_token, \
+ nm_utils_syslog_to_str (level), \
+ (long) getpid () \
+ _NM_UTILS_MACRO_REST (__VA_ARGS__)); \
} \
} G_STMT_END
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]