summaryrefslogtreecommitdiff
path: root/src/devices
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2015-01-14 15:16:16 +0100
committerDan Williams <dcbw@redhat.com>2015-01-21 18:36:00 -0600
commita6fedb1a26ea9109d26c92f7366dcf2a9ecab01b (patch)
treea62822d3041b7d24c65a279aa810d9120d82bf86 /src/devices
parentfe090c34b7247116a1424d956148548cd0237c4b (diff)
downloadNetworkManager-a6fedb1a26ea9109d26c92f7366dcf2a9ecab01b.tar.gz
wwan: consolidate format of log messages
Diffstat (limited to 'src/devices')
-rw-r--r--src/devices/wwan/nm-modem-broadband.c12
-rw-r--r--src/devices/wwan/nm-modem.c18
2 files changed, 16 insertions, 14 deletions
diff --git a/src/devices/wwan/nm-modem-broadband.c b/src/devices/wwan/nm-modem-broadband.c
index 31d09e1c7f..97d05ee2cd 100644
--- a/src/devices/wwan/nm-modem-broadband.c
+++ b/src/devices/wwan/nm-modem-broadband.c
@@ -203,7 +203,7 @@ connect_ready (MMModemSimple *simple_iface,
if (g_dbus_error_is_remote_error (error))
g_dbus_error_strip_remote_error (error);
- nm_log_warn (LOGD_MB, "(%s) failed to connect modem: %s",
+ nm_log_warn (LOGD_MB, "(%s): failed to connect modem: %s",
nm_modem_get_uid (NM_MODEM (self)),
error && error->message ? error->message : "(unknown)");
g_signal_emit_by_name (self, NM_MODEM_PREPARE_RESULT, FALSE, translate_mm_error (error));
@@ -225,7 +225,7 @@ connect_ready (MMModemSimple *simple_iface,
if (ip4_method == NM_MODEM_IP_METHOD_UNKNOWN &&
ip6_method == NM_MODEM_IP_METHOD_UNKNOWN) {
- nm_log_warn (LOGD_MB, "(%s) failed to connect modem: invalid bearer IP configuration",
+ nm_log_warn (LOGD_MB, "(%s): failed to connect modem: invalid bearer IP configuration",
nm_modem_get_uid (NM_MODEM (self)));
error = g_error_new_literal (NM_DEVICE_ERROR,
@@ -365,7 +365,7 @@ act_stage1_prepare (NMModem *_self,
else if (MODEM_CAPS_3GPP2 (caps))
self->priv->connect_properties = create_cdma_connect_properties (connection);
else {
- nm_log_warn (LOGD_MB, "(%s) not a mobile broadband modem",
+ nm_log_warn (LOGD_MB, "(%s): not a mobile broadband modem",
nm_modem_get_uid (NM_MODEM (self)));
*reason = NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED;
return NM_ACT_STAGE_RETURN_FAILURE;
@@ -566,7 +566,7 @@ set_power_state_low_ready (MMModem *modem,
if (!mm_modem_set_power_state_finish (modem, result, &error)) {
/* Log but ignore errors; not all modems support low power state */
- nm_log_dbg (LOGD_MB, "(%s) failed to set modem low power state: %s",
+ nm_log_dbg (LOGD_MB, "(%s): failed to set modem low power state: %s",
nm_modem_get_uid (NM_MODEM (self)),
error && error->message ? error->message : "(unknown)");
g_clear_error (&error);
@@ -591,7 +591,7 @@ modem_disable_ready (MMModem *modem_iface,
(GAsyncReadyCallback) set_power_state_low_ready,
g_object_ref (self));
} else {
- nm_log_warn (LOGD_MB, "(%s) failed to disable modem: %s",
+ nm_log_warn (LOGD_MB, "(%s): failed to disable modem: %s",
nm_modem_get_uid (NM_MODEM (self)),
error && error->message ? error->message : "(unknown)");
nm_modem_set_prev_state (NM_MODEM (self), "disable failed");
@@ -1069,7 +1069,7 @@ get_sim_ready (MMModem *modem,
NULL);
g_object_unref (new_sim);
} else {
- nm_log_warn (LOGD_MB, "(%s) failed to retrieve SIM object: %s",
+ nm_log_warn (LOGD_MB, "(%s): failed to retrieve SIM object: %s",
nm_modem_get_uid (NM_MODEM (self)),
error && error->message ? error->message : "(unknown)");
}
diff --git a/src/devices/wwan/nm-modem.c b/src/devices/wwan/nm-modem.c
index 9b913cbb48..e2f380ab31 100644
--- a/src/devices/wwan/nm-modem.c
+++ b/src/devices/wwan/nm-modem.c
@@ -175,23 +175,23 @@ nm_modem_set_mm_enabled (NMModem *self,
NMModemState prev_state = priv->state;
if (enabled && priv->state >= NM_MODEM_STATE_ENABLING) {
- nm_log_dbg (LOGD_MB, "(%s) cannot enable modem: already enabled",
+ nm_log_dbg (LOGD_MB, "(%s): cannot enable modem: already enabled",
nm_modem_get_uid (self));
return;
}
if (!enabled && priv->state <= NM_MODEM_STATE_DISABLING) {
- nm_log_dbg (LOGD_MB, "(%s) cannot disable modem: already disabled",
+ nm_log_dbg (LOGD_MB, "(%s): cannot disable modem: already disabled",
nm_modem_get_uid (self));
return;
}
if (priv->state <= NM_MODEM_STATE_INITIALIZING) {
- nm_log_dbg (LOGD_MB, "(%s) cannot enable/disable modem: initializing or failed",
+ nm_log_dbg (LOGD_MB, "(%s): cannot enable/disable modem: initializing or failed",
nm_modem_get_uid (self));
return;
} else if (priv->state == NM_MODEM_STATE_LOCKED) {
/* Don't try to enable if the modem is locked since that will fail */
- nm_log_warn (LOGD_MB, "(%s) cannot enable/disable modem: locked",
+ nm_log_warn (LOGD_MB, "(%s): cannot enable/disable modem: locked",
nm_modem_get_uid (self));
/* Try to unlock the modem if it's being enabled */
@@ -464,7 +464,8 @@ ppp_stage3_ip_config_start (NMModem *self,
/* Check if ModemManager requested a specific IP timeout to be used. If 0 reported,
* use the default one (30s) */
if (priv->mm_ip_timeout > 0) {
- nm_log_info (LOGD_PPP, "using modem-specified IP timeout: %u seconds",
+ nm_log_info (LOGD_PPP, "(%s): using modem-specified IP timeout: %u seconds",
+ nm_modem_get_uid (self),
priv->mm_ip_timeout);
ip_timeout = priv->mm_ip_timeout;
}
@@ -486,7 +487,8 @@ ppp_stage3_ip_config_start (NMModem *self,
ret = NM_ACT_STAGE_RETURN_POSTPONE;
} else {
- nm_log_err (LOGD_PPP, "error starting PPP: (%d) %s",
+ nm_log_err (LOGD_PPP, "(%s): error starting PPP: (%d) %s",
+ nm_modem_get_uid (self),
error ? error->code : -1,
error && error->message ? error->message : "(unknown)");
g_error_free (error);
@@ -705,7 +707,7 @@ modem_secrets_cb (NMActRequest *req,
priv->secrets_id = 0;
if (error)
- nm_log_warn (LOGD_MB, "%s", error->message);
+ nm_log_warn (LOGD_MB, "(%s): %s", nm_modem_get_uid (self), error->message);
g_signal_emit (self, signals[AUTH_RESULT], 0, error);
}
@@ -953,7 +955,7 @@ ppp_manager_stop_ready (NMPPPManager *ppp_manager,
GError *error = NULL;
if (!nm_ppp_manager_stop_finish (ppp_manager, res, &error)) {
- nm_log_warn (LOGD_MB, "(%s) cannot stop PPP manager: %s",
+ nm_log_warn (LOGD_MB, "(%s): cannot stop PPP manager: %s",
nm_modem_get_uid (ctx->self),
error->message);
g_simple_async_result_take_error (ctx->result, error);