[network-manager-pptp: 8/12] service: configure logging level of pptp via NM_VPN_LOG_LEVEL
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-pptp: 8/12] service: configure logging level of pptp via NM_VPN_LOG_LEVEL
- Date: Tue, 20 Sep 2016 10:07:05 +0000 (UTC)
commit d3bcc3847507b0b4c02f120fb5c3ee6ec35e17c4
Author: Thomas Haller <thaller redhat com>
Date: Mon Sep 19 16:35:29 2016 +0200
service: configure logging level of pptp via NM_VPN_LOG_LEVEL
src/nm-pptp-service.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/nm-pptp-service.c b/src/nm-pptp-service.c
index 506a96d..fb76c59 100644
--- a/src/nm-pptp-service.c
+++ b/src/nm-pptp-service.c
@@ -436,6 +436,7 @@ construct_pppd_args (NMPptpPlugin *plugin,
GPtrArray *args = NULL;
const char *value, *pptp_binary;
char *ipparam, *tmp;
+ char log_level;
pptp_binary = nm_find_pptp ();
if (!pptp_binary) {
@@ -462,10 +463,17 @@ construct_pppd_args (NMPptpPlugin *plugin,
ipparam = g_strdup_printf ("nm-pptp-service-%d", getpid ());
+ if (gl.log_level >= LOG_INFO)
+ log_level = '2';
+ else if (gl.log_level >= LOG_NOTICE)
+ log_level = '1';
+ else
+ log_level = '0';
+
g_ptr_array_add (args, (gpointer) g_strdup ("pty"));
tmp = g_strdup_printf ("%s %s --nolaunchpppd --loglevel %c --logstring %s",
pptp_binary, gwaddr,
- _LOGD_enabled () ? '2' : '0',
+ log_level,
ipparam);
g_ptr_array_add (args, (gpointer) tmp);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]