diff options
author | Thomas Haller <thaller@redhat.com> | 2017-06-07 13:30:08 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-06-08 13:39:21 +0200 |
commit | dce0b5bbc682e5d37c5a9fa57264c0c71ddd261d (patch) | |
tree | 9fc472814df7a14de4c0cd45693643d2bda79a49 | |
parent | a46ef205d59968bbed3f5c0a03d4e1ddd232365d (diff) | |
download | NetworkManager-dce0b5bbc682e5d37c5a9fa57264c0c71ddd261d.tar.gz |
manager: add more logging to recheck_assume_connection()
and give all lines a logging prefix.
-rw-r--r-- | src/nm-manager.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/nm-manager.c b/src/nm-manager.c index 53627ce945..9e07a05a59 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -1884,22 +1884,27 @@ recheck_assume_connection (NMManager *self, if (!nm_device_get_managed (device, FALSE)) { nm_device_assume_state_reset (device); + _LOG2D (LOGD_DEVICE, device, "assume: don't assume because %s", "not managed"); return FALSE; } state = nm_device_get_state (device); if (state > NM_DEVICE_STATE_DISCONNECTED) { nm_device_assume_state_reset (device); + _LOG2D (LOGD_DEVICE, device, "assume: don't assume due to device state %s", + nm_device_state_to_str (state)); return FALSE; } connection = get_existing_connection (self, device, &generated); if (!connection) { - _LOG2D (LOGD_DEVICE, device, "can't assume; no connection"); + _LOG2D (LOGD_DEVICE, device, "assume: don't assume because %s", "no connection was generated"); return FALSE; } - _LOG2D (LOGD_DEVICE, device, "will attempt to assume connection"); + _LOG2D (LOGD_DEVICE, device, "assume: will attempt to assume %sconnection %s", + generated ? "generated " : "", + nm_connection_get_uuid (NM_CONNECTION (connection))); nm_device_sys_iface_state_set (device, generated @@ -1934,7 +1939,7 @@ recheck_assume_connection (NMManager *self, &error); if (!active) { - _LOGW (LOGD_DEVICE, "assumed connection %s failed to activate: %s", + _LOGW (LOGD_DEVICE, "assume: assumed connection %s failed to activate: %s", nm_connection_get_path (NM_CONNECTION (connection)), error->message); g_error_free (error); @@ -1946,7 +1951,7 @@ recheck_assume_connection (NMManager *self, } if (generated) { - _LOG2D (LOGD_DEVICE, device, "connection assumption failed. Deleting generated connection"); + _LOG2D (LOGD_DEVICE, device, "assume: deleting generated connection after assuming failed"); nm_settings_connection_delete (connection, NULL, NULL); } else { if (nm_device_sys_iface_state_get (device) == NM_DEVICE_SYS_IFACE_STATE_ASSUME) |