From cc993aa02040564c16d78c864f3c3a22d20443eb Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 6 Nov 2017 11:52:05 +0100 Subject: [PATCH] logging: configure dnsmasq's logging in shared mode via nm-logging --- man/NetworkManager.conf.xml | 2 +- src/dnsmasq/nm-dnsmasq-manager.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/man/NetworkManager.conf.xml b/man/NetworkManager.conf.xml index 2f09973835..f0c3c5c85b 100644 --- a/man/NetworkManager.conf.xml +++ b/man/NetworkManager.conf.xml @@ -556,7 +556,7 @@ unmanaged-devices=mac:00:22:68:1c:59:b1;mac:00:1E:65:30:D1:C4;interface-name:eth AUTOIP4 : AutoIP operations DNS : Domain Name System related operations VPN : Virtual Private Network connections and operations - SHARING : Connection sharing + SHARING : Connection sharing. With TRACE level log queries for dnsmasq instance SUPPLICANT : WPA supplicant related operations AGENTS : Secret agents operations and communication SETTINGS : Settings/config service operations diff --git a/src/dnsmasq/nm-dnsmasq-manager.c b/src/dnsmasq/nm-dnsmasq-manager.c index 4ac1e7c350..323ef78198 100644 --- a/src/dnsmasq/nm-dnsmasq-manager.c +++ b/src/dnsmasq/nm-dnsmasq-manager.c @@ -175,7 +175,8 @@ create_dm_cmd_line (const char *iface, cmd = nm_cmd_line_new (); nm_cmd_line_add_string (cmd, dm_binary); - if (getenv ("NM_DNSMASQ_DEBUG")) { + if ( nm_logging_enabled (LOGL_TRACE, LOGD_SHARING) + || getenv ("NM_DNSMASQ_DEBUG")) { nm_cmd_line_add_string (cmd, "--log-dhcp"); nm_cmd_line_add_string (cmd, "--log-queries"); }