summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-11-06 12:58:55 +0100
committerThomas Haller <thaller@redhat.com>2015-11-06 14:16:41 +0100
commit95878673495474eb4d4190fdb6f2a17bafd212d0 (patch)
tree51abd19f610a9d1b4528b1baa5c483dc31c5e732
parentb9da3d93207e46de895fd07cfe9de1edfa79efef (diff)
downloadNetworkManager-95878673495474eb4d4190fdb6f2a17bafd212d0.tar.gz
logging: swap names of logging macros _LOGT() and _LOGt()
Previsously, _LOGT() could be disabled at compile time. Thus it was different then the other macros _LOGD(), _LOGI(), etc. OTOH, _LOGt() was the macro that always was compiled in. Swap the name of the macros. Now the upper-case macros are always enabled, while the lower-case macro _LOGt() is enabled depending on compile configuration.
-rw-r--r--src/dns-manager/nm-dns-manager.c4
-rw-r--r--src/nm-logging.h14
-rw-r--r--src/nm-route-manager.c30
-rw-r--r--src/platform/nm-linux-platform.c74
-rw-r--r--src/platform/nm-platform.c6
-rw-r--r--src/platform/nmp-object.c6
-rw-r--r--src/platform/tests/test-address.c4
-rw-r--r--src/settings/nm-secret-agent.c12
8 files changed, 75 insertions, 75 deletions
diff --git a/src/dns-manager/nm-dns-manager.c b/src/dns-manager/nm-dns-manager.c
index fbf5da1201..01e8bf1db5 100644
--- a/src/dns-manager/nm-dns-manager.c
+++ b/src/dns-manager/nm-dns-manager.c
@@ -1406,7 +1406,7 @@ nm_dns_manager_init (NMDnsManager *self)
{
NMDnsManagerPrivate *priv = NM_DNS_MANAGER_GET_PRIVATE (self);
- _LOGt ("creating...");
+ _LOGT ("creating...");
priv->config = g_object_ref (nm_config_get ());
/* Set the initial hash */
@@ -1428,7 +1428,7 @@ dispose (GObject *object)
NMDnsManagerPrivate *priv = NM_DNS_MANAGER_GET_PRIVATE (self);
GError *error = NULL;
- _LOGt ("disposing");
+ _LOGT ("disposing");
if (priv->plugin) {
g_signal_handlers_disconnect_by_func (priv->plugin, plugin_failed, self);
diff --git a/src/nm-logging.h b/src/nm-logging.h
index b54078186e..19b965f8f3 100644
--- a/src/nm-logging.h
+++ b/src/nm-logging.h
@@ -177,27 +177,27 @@ void nm_logging_syslog_openlog (const char *logging_backend);
* might want to undef this and redefine it. */
#define _NMLOG_ENABLED(level) ( nm_logging_enabled ((level), (_NMLOG_DOMAIN)) )
-#define _LOGt(...) _NMLOG (LOGL_TRACE, __VA_ARGS__)
+#define _LOGT(...) _NMLOG (LOGL_TRACE, __VA_ARGS__)
#define _LOGD(...) _NMLOG (LOGL_DEBUG, __VA_ARGS__)
#define _LOGI(...) _NMLOG (LOGL_INFO , __VA_ARGS__)
#define _LOGW(...) _NMLOG (LOGL_WARN , __VA_ARGS__)
#define _LOGE(...) _NMLOG (LOGL_ERR , __VA_ARGS__)
-#define _LOGt_ENABLED(...) _NMLOG_ENABLED (LOGL_TRACE, ##__VA_ARGS__)
+#define _LOGT_ENABLED(...) _NMLOG_ENABLED (LOGL_TRACE, ##__VA_ARGS__)
#define _LOGD_ENABLED(...) _NMLOG_ENABLED (LOGL_DEBUG, ##__VA_ARGS__)
#define _LOGI_ENABLED(...) _NMLOG_ENABLED (LOGL_INFO , ##__VA_ARGS__)
#define _LOGW_ENABLED(...) _NMLOG_ENABLED (LOGL_WARN , ##__VA_ARGS__)
#define _LOGE_ENABLED(...) _NMLOG_ENABLED (LOGL_ERR , ##__VA_ARGS__)
-/* _LOGt() and _LOGT() both log with level TRACE, but the latter is disabled by default,
+/* _LOGT() and _LOGt() both log with level TRACE, but the latter is disabled by default,
* unless building with --with-more-logging. */
#ifdef NM_MORE_LOGGING
-#define _LOGT_ENABLED(...) _NMLOG_ENABLED (LOGL_TRACE, ##__VA_ARGS__)
-#define _LOGT(...) _NMLOG (LOGL_TRACE, __VA_ARGS__)
+#define _LOGt_ENABLED(...) _NMLOG_ENABLED (LOGL_TRACE, ##__VA_ARGS__)
+#define _LOGt(...) _NMLOG (LOGL_TRACE, __VA_ARGS__)
#else
/* still call the logging macros to get compile time checks, but they will be optimized out. */
-#define _LOGT_ENABLED(...) ( FALSE && (_NMLOG_ENABLED (LOGL_TRACE, ##__VA_ARGS__)) )
-#define _LOGT(...) G_STMT_START { if (FALSE) { _NMLOG (LOGL_TRACE, __VA_ARGS__); } } G_STMT_END
+#define _LOGt_ENABLED(...) ( FALSE && (_NMLOG_ENABLED (LOGL_TRACE, ##__VA_ARGS__)) )
+#define _LOGt(...) G_STMT_START { if (FALSE) { _NMLOG (LOGL_TRACE, __VA_ARGS__); } } G_STMT_END
#endif
/*****************************************************************************/
diff --git a/src/nm-route-manager.c b/src/nm-route-manager.c
index 1a89af7433..f2ab073bd9 100644
--- a/src/nm-route-manager.c
+++ b/src/nm-route-manager.c
@@ -464,13 +464,13 @@ _vx_route_sync (const VTableIP *vtable, NMRouteManager *self, int ifindex, const
ASSERT_route_index_valid (vtable, known_routes, known_routes_idx, FALSE);
_LOGD (vtable->vt->addr_family, "%3d: sync %u IPv%c routes", ifindex, known_routes_idx->len, vtable->vt->is_ip4 ? '4' : '6');
- if (_LOGT_ENABLED (vtable->vt->addr_family)) {
+ if (_LOGt_ENABLED (vtable->vt->addr_family)) {
for (i = 0; i < known_routes_idx->len; i++) {
- _LOGT (vtable->vt->addr_family, "%3d: sync new route #%u: %s",
+ _LOGt (vtable->vt->addr_family, "%3d: sync new route #%u: %s",
ifindex, i, vtable->vt->route_to_string (VTABLE_ROUTE_INDEX (vtable, known_routes, i), NULL, 0));
}
for (i = 0; i < ipx_routes->index->len; i++)
- _LOGT (vtable->vt->addr_family, "%3d: STATE: has #%u - %s (%lld)",
+ _LOGt (vtable->vt->addr_family, "%3d: STATE: has #%u - %s (%lld)",
ifindex, i,
vtable->vt->route_to_string (ipx_routes->index->entries[i], NULL, 0),
(long long) g_array_index (ipx_routes->effective_metrics, gint64, i));
@@ -512,7 +512,7 @@ _vx_route_sync (const VTableIP *vtable, NMRouteManager *self, int ifindex, const
cur_ipx_route->rx.ifindex = ifindex;
cur_ipx_route->rx.metric = vtable->vt->metric_normalize (cur_ipx_route->rx.metric);
ipx_routes_changed = TRUE;
- _LOGT (vtable->vt->addr_family, "%3d: STATE: update #%u - %s", ifindex, i_ipx_routes,
+ _LOGt (vtable->vt->addr_family, "%3d: STATE: update #%u - %s", ifindex, i_ipx_routes,
vtable->vt->route_to_string (cur_ipx_route, NULL, 0));
}
} else if (cur_known_route) {
@@ -571,7 +571,7 @@ _vx_route_sync (const VTableIP *vtable, NMRouteManager *self, int ifindex, const
&& cur_plat_route->rx.metric == *p_effective_metric) {
/* we are about to delete cur_ipx_route and we have a matching route
* in platform. Delete it. */
- _LOGT (vtable->vt->addr_family, "%3d: platform rt-rm #%u - %s", ifindex, i_plat_routes,
+ _LOGt (vtable->vt->addr_family, "%3d: platform rt-rm #%u - %s", ifindex, i_plat_routes,
vtable->vt->route_to_string (cur_plat_route, NULL, 0));
vtable->vt->route_delete (priv->platform, ifindex, cur_plat_route);
}
@@ -584,7 +584,7 @@ _vx_route_sync (const VTableIP *vtable, NMRouteManager *self, int ifindex, const
for (i = 0; i < to_delete_indexes->len; i++) {
guint idx = g_array_index (to_delete_indexes, guint, i);
- _LOGT (vtable->vt->addr_family, "%3d: STATE: delete #%u - %s", ifindex, idx,
+ _LOGt (vtable->vt->addr_family, "%3d: STATE: delete #%u - %s", ifindex, idx,
vtable->vt->route_to_string (ipx_routes->index->entries[idx], NULL, 0));
g_array_index (to_delete_indexes, guint, i) = _route_index_reverse_idx (vtable, ipx_routes->index, idx, ipx_routes->entries);
}
@@ -609,7 +609,7 @@ _vx_route_sync (const VTableIP *vtable, NMRouteManager *self, int ifindex, const
g_array_index (ipx_routes->effective_metrics_reverse, gint64, j++) = -1;
- _LOGT (vtable->vt->addr_family, "%3d: STATE: added #%u - %s", ifindex, ipx_routes->entries->len - 1,
+ _LOGt (vtable->vt->addr_family, "%3d: STATE: added #%u - %s", ifindex, ipx_routes->entries->len - 1,
vtable->vt->route_to_string (ipx_route, NULL, 0));
}
g_ptr_array_unref (to_add_routes);
@@ -695,7 +695,7 @@ _vx_route_sync (const VTableIP *vtable, NMRouteManager *self, int ifindex, const
break;
}
next:
- _LOGT (vtable->vt->addr_family, "%3d: new metric #%u - %s (%lld)",
+ _LOGt (vtable->vt->addr_family, "%3d: new metric #%u - %s (%lld)",
ifindex, i_ipx_routes,
vtable->vt->route_to_string (cur_ipx_route, NULL, 0),
(long long) *p_effective_metric);
@@ -720,7 +720,7 @@ next:
g_assert (cur_plat_route->rx.ifindex == ifindex);
- _LOGT (vtable->vt->addr_family, "%3d: platform rt #%u - %s", ifindex, i_plat_routes, vtable->vt->route_to_string (cur_plat_route, NULL, 0));
+ _LOGt (vtable->vt->addr_family, "%3d: platform rt #%u - %s", ifindex, i_plat_routes, vtable->vt->route_to_string (cur_plat_route, NULL, 0));
/* skip over @cur_ipx_route that are ordered before @cur_plat_route */
while ( cur_ipx_route
@@ -990,7 +990,7 @@ _ip4_device_routes_idle_cb (IP4DeviceRoutePurgeEntry *entry)
return G_SOURCE_REMOVE;
}
- _LOGT (vtable_v4.vt->addr_family, "device-route: delete %s", nmp_object_to_string (entry->obj, NMP_OBJECT_TO_STRING_PUBLIC, NULL, 0));
+ _LOGt (vtable_v4.vt->addr_family, "device-route: delete %s", nmp_object_to_string (entry->obj, NMP_OBJECT_TO_STRING_PUBLIC, NULL, 0));
nm_platform_ip4_route_delete (priv->platform,
entry->obj->ip4_route.ifindex,
@@ -1033,14 +1033,14 @@ _ip4_device_routes_ip4_route_changed (NMPlatform *platform,
return;
if (_ip4_device_routes_entry_expired (entry, nm_utils_get_monotonic_timestamp_ns ())) {
- _LOGT (vtable_v4.vt->addr_family, "device-route: cleanup-ch %s", nmp_object_to_string (entry->obj, NMP_OBJECT_TO_STRING_PUBLIC, NULL, 0));
+ _LOGt (vtable_v4.vt->addr_family, "device-route: cleanup-ch %s", nmp_object_to_string (entry->obj, NMP_OBJECT_TO_STRING_PUBLIC, NULL, 0));
g_hash_table_remove (priv->ip4_device_routes.entries, entry->obj);
_ip4_device_routes_cancel (self);
return;
}
if (entry->idle_id == 0) {
- _LOGT (vtable_v4.vt->addr_family, "device-route: schedule %s", nmp_object_to_string (entry->obj, NMP_OBJECT_TO_STRING_PUBLIC, NULL, 0));
+ _LOGt (vtable_v4.vt->addr_family, "device-route: schedule %s", nmp_object_to_string (entry->obj, NMP_OBJECT_TO_STRING_PUBLIC, NULL, 0));
entry->idle_id = g_idle_add ((GSourceFunc) _ip4_device_routes_idle_cb, entry);
}
}
@@ -1053,7 +1053,7 @@ _ip4_device_routes_cancel (NMRouteManager *self)
if (priv->ip4_device_routes.gc_id) {
if (g_hash_table_size (priv->ip4_device_routes.entries) > 0)
return G_SOURCE_CONTINUE;
- _LOGT (vtable_v4.vt->addr_family, "device-route: cancel");
+ _LOGt (vtable_v4.vt->addr_family, "device-route: cancel");
if (priv->platform)
g_signal_handlers_disconnect_by_func (priv->platform, G_CALLBACK (_ip4_device_routes_ip4_route_changed), self);
nm_clear_g_source (&priv->ip4_device_routes.gc_id);
@@ -1074,7 +1074,7 @@ _ip4_device_routes_gc (NMRouteManager *self)
g_hash_table_iter_init (&iter, priv->ip4_device_routes.entries);
while (g_hash_table_iter_next (&iter, NULL, (gpointer *) &entry)) {
if (_ip4_device_routes_entry_expired (entry, now)) {
- _LOGT (vtable_v4.vt->addr_family, "device-route: cleanup-gc %s", nmp_object_to_string (entry->obj, NMP_OBJECT_TO_STRING_PUBLIC, NULL, 0));
+ _LOGt (vtable_v4.vt->addr_family, "device-route: cleanup-gc %s", nmp_object_to_string (entry->obj, NMP_OBJECT_TO_STRING_PUBLIC, NULL, 0));
g_hash_table_iter_remove (&iter);
}
}
@@ -1107,7 +1107,7 @@ nm_route_manager_ip4_route_register_device_route_purge_list (NMRouteManager *sel
IP4DeviceRoutePurgeEntry *entry;
entry = _ip4_device_routes_purge_entry_create (self, &g_array_index (device_route_purge_list, NMPlatformIP4Route, i), now_ns);
- _LOGT (vtable_v4.vt->addr_family, "device-route: watch (%s) %s",
+ _LOGt (vtable_v4.vt->addr_family, "device-route: watch (%s) %s",
g_hash_table_contains (priv->ip4_device_routes.entries, entry->obj)
? "update" : "new",
nmp_object_to_string (entry->obj, NMP_OBJECT_TO_STRING_PUBLIC, NULL, 0));
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
index 53ad9d167d..31c8f26cba 100644
--- a/src/platform/nm-linux-platform.c
+++ b/src/platform/nm-linux-platform.c
@@ -2303,7 +2303,7 @@ do_emit_signal (NMPlatform *platform, const NMPObject *obj, NMPCacheOpsType cach
klass = NMP_OBJECT_GET_CLASS (obj);
- _LOGT ("emit signal %s %s: %s (%ld)",
+ _LOGt ("emit signal %s %s: %s (%ld)",
klass->signal_type,
nm_platform_signal_change_type_to_string ((NMPlatformSignalChangeType) cache_op),
nmp_object_to_string (obj, NMP_OBJECT_TO_STRING_PUBLIC, NULL, 0),
@@ -2360,8 +2360,8 @@ delayed_action_to_string (DelayedActionType action_type)
}
}
-#define _LOGT_delayed_action(action_type, arg, operation) \
- _LOGT ("delayed-action: %s %s (%d) [%p / %d]", ""operation, delayed_action_to_string (action_type), (int) action_type, arg, GPOINTER_TO_INT (arg))
+#define _LOGt_delayed_action(action_type, arg, operation) \
+ _LOGt ("delayed-action: %s %s (%d) [%p / %d]", ""operation, delayed_action_to_string (action_type), (int) action_type, arg, GPOINTER_TO_INT (arg))
static void
delayed_action_handle_MASTER_CONNECTED (NMPlatform *platform, int master_ifindex)
@@ -2416,7 +2416,7 @@ delayed_action_handle_one (NMPlatform *platform)
priv->delayed_action.flags &= ~DELAYED_ACTION_TYPE_MASTER_CONNECTED;
nm_assert (_nm_utils_ptrarray_find_first (priv->delayed_action.list_master_connected->pdata, priv->delayed_action.list_master_connected->len, user_data) < 0);
- _LOGT_delayed_action (DELAYED_ACTION_TYPE_MASTER_CONNECTED, user_data, "handle");
+ _LOGt_delayed_action (DELAYED_ACTION_TYPE_MASTER_CONNECTED, user_data, "handle");
delayed_action_handle_MASTER_CONNECTED (platform, GPOINTER_TO_INT (user_data));
return TRUE;
}
@@ -2425,7 +2425,7 @@ delayed_action_handle_one (NMPlatform *platform)
/* Next we prefer read-netlink, because the buffer size is limited and we want to process events
* from netlink early. */
if (NM_FLAGS_HAS (priv->delayed_action.flags, DELAYED_ACTION_TYPE_READ_NETLINK)) {
- _LOGT_delayed_action (DELAYED_ACTION_TYPE_READ_NETLINK, NULL, "handle");
+ _LOGt_delayed_action (DELAYED_ACTION_TYPE_READ_NETLINK, NULL, "handle");
priv->delayed_action.flags &= ~DELAYED_ACTION_TYPE_READ_NETLINK;
delayed_action_handle_READ_NETLINK (platform);
return TRUE;
@@ -2438,10 +2438,10 @@ delayed_action_handle_one (NMPlatform *platform)
priv->delayed_action.flags &= ~DELAYED_ACTION_TYPE_REFRESH_ALL;
- if (_LOGT_ENABLED ()) {
+ if (_LOGt_ENABLED ()) {
for (iflags = (DelayedActionType) 0x1LL; iflags <= DELAYED_ACTION_TYPE_MAX; iflags <<= 1) {
if (NM_FLAGS_HAS (flags, iflags))
- _LOGT_delayed_action (iflags, NULL, "handle");
+ _LOGt_delayed_action (iflags, NULL, "handle");
}
}
@@ -2458,7 +2458,7 @@ delayed_action_handle_one (NMPlatform *platform)
priv->delayed_action.flags &= ~DELAYED_ACTION_TYPE_REFRESH_LINK;
nm_assert (_nm_utils_ptrarray_find_first (priv->delayed_action.list_refresh_link->pdata, priv->delayed_action.list_refresh_link->len, user_data) < 0);
- _LOGT_delayed_action (DELAYED_ACTION_TYPE_REFRESH_LINK, user_data, "handle");
+ _LOGt_delayed_action (DELAYED_ACTION_TYPE_REFRESH_LINK, user_data, "handle");
delayed_action_handle_REFRESH_LINK (platform, GPOINTER_TO_INT (user_data));
@@ -2509,7 +2509,7 @@ delayed_action_clear_REFRESH_LINK (NMPlatform *platform, int ifindex)
if (idx < 0)
return;
- _LOGT_delayed_action (DELAYED_ACTION_TYPE_REFRESH_LINK, user_data, "clear");
+ _LOGt_delayed_action (DELAYED_ACTION_TYPE_REFRESH_LINK, user_data, "clear");
g_ptr_array_remove_index_fast (priv->delayed_action.list_refresh_link, idx);
if (priv->delayed_action.list_refresh_link->len == 0)
@@ -2537,10 +2537,10 @@ delayed_action_schedule (NMPlatform *platform, DelayedActionType action_type, gp
priv->delayed_action.flags |= action_type;
- if (_LOGT_ENABLED ()) {
+ if (_LOGt_ENABLED ()) {
for (iflags = (DelayedActionType) 0x1LL; iflags <= DELAYED_ACTION_TYPE_MAX; iflags <<= 1) {
if (NM_FLAGS_HAS (action_type, iflags))
- _LOGT_delayed_action (iflags, user_data, "schedule");
+ _LOGt_delayed_action (iflags, user_data, "schedule");
}
}
@@ -2558,7 +2558,7 @@ cache_prune_candidates_record_all (NMPlatform *platform, NMPObjectType obj_type)
priv->prune_candidates = nmp_cache_lookup_all_to_hash (priv->cache,
nmp_cache_id_init_object_type (NMP_CACHE_ID_STATIC, obj_type, FALSE),
priv->prune_candidates);
- _LOGT ("cache-prune: record %s (now %u candidates)", nmp_class_from_type (obj_type)->obj_type_name,
+ _LOGt ("cache-prune: record %s (now %u candidates)", nmp_class_from_type (obj_type)->obj_type_name,
priv->prune_candidates ? g_hash_table_size (priv->prune_candidates) : 0);
}
@@ -2575,8 +2575,8 @@ cache_prune_candidates_record_one (NMPlatform *platform, NMPObject *obj)
if (!priv->prune_candidates)
priv->prune_candidates = g_hash_table_new_full (NULL, NULL, (GDestroyNotify) nmp_object_unref, NULL);
- if (_LOGT_ENABLED () && !g_hash_table_contains (priv->prune_candidates, obj))
- _LOGT ("cache-prune: record-one: %s", nmp_object_to_string (obj, NMP_OBJECT_TO_STRING_ALL, NULL, 0));
+ if (_LOGt_ENABLED () && !g_hash_table_contains (priv->prune_candidates, obj))
+ _LOGt ("cache-prune: record-one: %s", nmp_object_to_string (obj, NMP_OBJECT_TO_STRING_ALL, NULL, 0));
g_hash_table_add (priv->prune_candidates, nmp_object_ref (obj));
}
@@ -2590,8 +2590,8 @@ cache_prune_candidates_drop (NMPlatform *platform, const NMPObject *obj)
priv = NM_LINUX_PLATFORM_GET_PRIVATE (platform);
if (priv->prune_candidates) {
- if (_LOGT_ENABLED () && g_hash_table_contains (priv->prune_candidates, obj))
- _LOGT ("cache-prune: drop-one: %s", nmp_object_to_string (obj, NMP_OBJECT_TO_STRING_ALL, NULL, 0));
+ if (_LOGt_ENABLED () && g_hash_table_contains (priv->prune_candidates, obj))
+ _LOGt ("cache-prune: drop-one: %s", nmp_object_to_string (obj, NMP_OBJECT_TO_STRING_ALL, NULL, 0));
g_hash_table_remove (priv->prune_candidates, obj);
}
}
@@ -2616,7 +2616,7 @@ cache_prune_candidates_prune (NMPlatform *platform)
while (g_hash_table_iter_next (&iter, (gpointer *)&obj, NULL)) {
nm_auto_nmpobj NMPObject *obj_cache = NULL;
- _LOGT ("cache-prune: prune %s", nmp_object_to_string (obj, NMP_OBJECT_TO_STRING_ALL, NULL, 0));
+ _LOGt ("cache-prune: prune %s", nmp_object_to_string (obj, NMP_OBJECT_TO_STRING_ALL, NULL, 0));
cache_op = nmp_cache_remove (priv->cache, obj, TRUE, &obj_cache, &was_visible, cache_pre_hook, platform);
do_emit_signal (platform, obj_cache, cache_op, was_visible, NM_PLATFORM_REASON_INTERNAL);
}
@@ -2650,7 +2650,7 @@ cache_delayed_deletion_prune (NMPlatform *platform)
if (prune_list) {
for (i = 0; i < prune_list->len; i++) {
obj = prune_list->pdata[i];
- _LOGT ("delayed-deletion: delete %s", nmp_object_to_string (obj, NMP_OBJECT_TO_STRING_ID, NULL, 0));
+ _LOGt ("delayed-deletion: delete %s", nmp_object_to_string (obj, NMP_OBJECT_TO_STRING_ID, NULL, 0));
cache_remove_netlink (platform, obj, NULL, NULL, NM_PLATFORM_REASON_EXTERNAL);
}
g_ptr_array_unref (prune_list);
@@ -2677,7 +2677,7 @@ cache_pre_hook (NMPCache *cache, const NMPObject *old, const NMPObject *new, NMP
nm_assert (klass == (new ? NMP_OBJECT_GET_CLASS (new) : NMP_OBJECT_GET_CLASS (old)));
- _LOGT ("update-cache-%s: %s: %s%s%s",
+ _LOGt ("update-cache-%s: %s: %s%s%s",
klass->obj_type_name,
(ops_type == NMP_CACHE_OPS_UPDATED
? "UPDATE"
@@ -2869,7 +2869,7 @@ _new_sequence_number (NMPlatform *platform, guint32 seq)
{
NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE (platform);
- _LOGT ("_new_sequence_number(): new sequence number %u", seq);
+ _LOGt ("_new_sequence_number(): new sequence number %u", seq);
priv->nlh_seq_expect = seq;
}
@@ -2895,7 +2895,7 @@ do_request_link (NMPlatform *platform, int ifindex, const char *name, gboolean h
cache_prune_candidates_record_one (platform,
(NMPObject *) nmp_cache_lookup_link (priv->cache, ifindex));
obj = nmp_object_new_link (ifindex);
- _LOGT ("delayed-deletion: protect object %s", nmp_object_to_string (obj, NMP_OBJECT_TO_STRING_ID, NULL, 0));
+ _LOGt ("delayed-deletion: protect object %s", nmp_object_to_string (obj, NMP_OBJECT_TO_STRING_ID, NULL, 0));
g_hash_table_insert (priv->delayed_deletion, obj, NULL);
}
@@ -2957,11 +2957,11 @@ do_request_all (NMPlatform *platform, DelayedActionType action_type, gboolean ha
/* clear any delayed action that request a refresh of this object type. */
priv->delayed_action.flags &= ~iflags;
- _LOGT_delayed_action (iflags, NULL, "handle (do-request-all)");
+ _LOGt_delayed_action (iflags, NULL, "handle (do-request-all)");
if (obj_type == NMP_OBJECT_TYPE_LINK) {
priv->delayed_action.flags &= ~DELAYED_ACTION_TYPE_REFRESH_LINK;
g_ptr_array_set_size (priv->delayed_action.list_refresh_link, 0);
- _LOGT_delayed_action (DELAYED_ACTION_TYPE_REFRESH_LINK, NULL, "clear (do-request-all)");
+ _LOGt_delayed_action (DELAYED_ACTION_TYPE_REFRESH_LINK, NULL, "clear (do-request-all)");
}
event_handler_read_netlink_all (platform, FALSE);
@@ -3010,13 +3010,13 @@ event_seq_check (struct nl_msg *msg, gpointer user_data)
priv->nlh_seq_last = hdr->nlmsg_seq;
if (priv->nlh_seq_expect == 0)
- _LOGT ("event_seq_check(): seq %u received (not waited)", hdr->nlmsg_seq);
+ _LOGt ("event_seq_check(): seq %u received (not waited)", hdr->nlmsg_seq);
else if (hdr->nlmsg_seq == priv->nlh_seq_expect) {
- _LOGT ("event_seq_check(): seq %u received", hdr->nlmsg_seq);
+ _LOGt ("event_seq_check(): seq %u received", hdr->nlmsg_seq);
priv->nlh_seq_expect = 0;
} else
- _LOGT ("event_seq_check(): seq %u received (wait for %u)", hdr->nlmsg_seq, priv->nlh_seq_last);
+ _LOGt ("event_seq_check(): seq %u received (wait for %u)", hdr->nlmsg_seq, priv->nlh_seq_last);
return NL_OK;
}
@@ -3024,7 +3024,7 @@ event_seq_check (struct nl_msg *msg, gpointer user_data)
static int
event_err (struct sockaddr_nl *nla, struct nlmsgerr *nlerr, gpointer platform)
{
- _LOGT ("event_err(): error from kernel: %s (%d) for request %d",
+ _LOGt ("event_err(): error from kernel: %s (%d) for request %d",
strerror (nlerr ? -nlerr->error : 0),
nlerr ? -nlerr->error : 0,
NM_LINUX_PLATFORM_GET_PRIVATE (platform)->nlh_seq_last);
@@ -3061,13 +3061,13 @@ event_notification (struct nl_msg *msg, gpointer user_data)
obj = nmp_object_new_from_nl (platform, priv->cache, msg, id_only);
if (!obj) {
- _LOGt ("event-notification: %s, seq %u: ignore",
+ _LOGT ("event-notification: %s, seq %u: ignore",
_nl_nlmsg_type_to_str (msghdr->nlmsg_type, buf_nlmsg_type, sizeof (buf_nlmsg_type)),
msghdr->nlmsg_seq);
return NL_OK;
}
- _LOGt ("event-notification: %s, seq %u: %s",
+ _LOGT ("event-notification: %s, seq %u: %s",
_nl_nlmsg_type_to_str (msghdr->nlmsg_type, buf_nlmsg_type, sizeof (buf_nlmsg_type)),
msghdr->nlmsg_seq, nmp_object_to_string (obj,
id_only ? NMP_OBJECT_TO_STRING_ID : NMP_OBJECT_TO_STRING_PUBLIC, NULL, 0));
@@ -3079,7 +3079,7 @@ event_notification (struct nl_msg *msg, gpointer user_data)
if (g_hash_table_lookup (priv->delayed_deletion, obj) != NULL) {
/* the object is scheduled for delayed deletion. Replace that object
* by clearing the value from priv->delayed_deletion. */
- _LOGT ("delayed-deletion: clear delayed deletion of protected object %s", nmp_object_to_string (obj, NMP_OBJECT_TO_STRING_ID, NULL, 0));
+ _LOGt ("delayed-deletion: clear delayed deletion of protected object %s", nmp_object_to_string (obj, NMP_OBJECT_TO_STRING_ID, NULL, 0));
g_hash_table_insert (priv->delayed_deletion, nmp_object_ref (obj), NULL);
}
delayed_action_clear_REFRESH_LINK (platform, obj->link.ifindex);
@@ -3095,7 +3095,7 @@ event_notification (struct nl_msg *msg, gpointer user_data)
&& g_hash_table_contains (priv->delayed_deletion, obj)) {
/* We sometimes receive spurious RTM_DELLINK events. In this case, we want to delay
* the deletion of the object until later. */
- _LOGT ("delayed-deletion: delay deletion of protected object %s", nmp_object_to_string (obj, NMP_OBJECT_TO_STRING_ID, NULL, 0));
+ _LOGt ("delayed-deletion: delay deletion of protected object %s", nmp_object_to_string (obj, NMP_OBJECT_TO_STRING_ID, NULL, 0));
g_hash_table_insert (priv->delayed_deletion, nmp_object_ref (obj), nmp_object_ref (obj));
break;
}
@@ -3441,7 +3441,7 @@ do_add_link (NMPlatform *platform,
* link so that it is in the cache. A better solution would be to do everything
* via one netlink socket. */
if (!nmp_cache_lookup_link_full (NM_LINUX_PLATFORM_GET_PRIVATE (platform)->cache, 0, name, FALSE, NM_LINK_TYPE_NONE, NULL, NULL)) {
- _LOGT ("do-add-link[%s/%s]: the added link is not yet ready. Request anew",
+ _LOGt ("do-add-link[%s/%s]: the added link is not yet ready. Request anew",
name,
nm_link_type_to_string (link_type));
do_request_link (platform, 0, name, TRUE);
@@ -3518,7 +3518,7 @@ do_add_addrroute (NMPlatform *platform, const NMPObject *obj_id, struct nl_msg *
/* FIXME: instead of re-requesting the added object, add it via nlh_event
* so that the events are in sync. */
if (!nmp_cache_lookup_obj (NM_LINUX_PLATFORM_GET_PRIVATE (platform)->cache, obj_id)) {
- _LOGT ("do-add-%s[%s]: the added object is not yet ready. Request anew",
+ _LOGt ("do-add-%s[%s]: the added object is not yet ready. Request anew",
NMP_OBJECT_GET_CLASS (obj_id)->obj_type_name,
nmp_object_to_string (obj_id, NMP_OBJECT_TO_STRING_ID, NULL, 0));
do_request_one_type (platform, NMP_OBJECT_GET_TYPE (obj_id), TRUE);
@@ -3595,14 +3595,14 @@ nle_failure:
obj = nmp_cache_lookup_link_full (priv->cache, obj_id->link.ifindex, obj_id->link.ifindex <= 0 && obj_id->link.name[0] ? obj_id->link.name : NULL, FALSE, NM_LINK_TYPE_NONE, NULL, NULL);
if (obj && obj->_link.netlink.is_in_netlink) {
- _LOGT ("do-delete-%s[%s]: reload: the deleted object is not yet removed. Request anew",
+ _LOGt ("do-delete-%s[%s]: reload: the deleted object is not yet removed. Request anew",
NMP_OBJECT_GET_CLASS (obj_id)->obj_type_name,
nmp_object_to_string (obj_id, NMP_OBJECT_TO_STRING_ID, NULL, 0));
do_request_link (platform, obj_id->link.ifindex, obj_id->link.name, TRUE);
}
} else {
if (nmp_cache_lookup_obj (priv->cache, obj_id)) {
- _LOGT ("do-delete-%s[%s]: reload: the deleted object is not yet removed. Request anew",
+ _LOGt ("do-delete-%s[%s]: reload: the deleted object is not yet removed. Request anew",
NMP_OBJECT_GET_CLASS (obj_id)->obj_type_name,
nmp_object_to_string (obj_id, NMP_OBJECT_TO_STRING_ID, NULL, 0));
do_request_one_type (platform, NMP_OBJECT_GET_TYPE (obj_id), TRUE);
@@ -5048,7 +5048,7 @@ event_handler_read_netlink_all (NMPlatform *platform, gboolean wait_for_acks)
if (!wait_for_acks || priv->nlh_seq_expect == 0) {
if (wait_for_seq)
- _LOGT ("read-netlink-all: ACK for sequence number %u received", priv->nlh_seq_expect);
+ _LOGt ("read-netlink-all: ACK for sequence number %u received", priv->nlh_seq_expect);
return any;
}
@@ -5056,7 +5056,7 @@ event_handler_read_netlink_all (NMPlatform *platform, gboolean wait_for_acks)
if (wait_for_seq != priv->nlh_seq_expect) {
/* We are waiting for a new sequence number (or we will wait for the first time).
* Reset/start counting the overall wait time. */
- _LOGT ("read-netlink-all: wait for ACK for sequence number %u...", priv->nlh_seq_expect);
+ _LOGt ("read-netlink-all: wait for ACK for sequence number %u...", priv->nlh_seq_expect);
wait_for_seq = priv->nlh_seq_expect;
timestamp = now;
timeout = TIMEOUT;
diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c
index 35cfc885ec..5124db6147 100644
--- a/src/platform/nm-platform.c
+++ b/src/platform/nm-platform.c
@@ -420,7 +420,7 @@ nm_platform_link_get_all (NMPlatform *self)
for (i = 0; i < links->len; i++) {
item = &g_array_index (links, NMPlatformLink, i);
- _LOGT ("link-get: %3d: %s", i, nm_platform_link_to_string (item, NULL, 0));
+ _LOGt ("link-get: %3d: %s", i, nm_platform_link_to_string (item, NULL, 0));
nm_assert (item->ifindex > 0 && !g_hash_table_contains (unseen, GINT_TO_POINTER (item->ifindex)));
@@ -475,7 +475,7 @@ nm_platform_link_get_all (NMPlatform *self)
if (item->parent > 0 && g_hash_table_contains (unseen, GINT_TO_POINTER (item->parent)))
continue;
- _LOGT ("link-get: add %3d -> %3d: %s", i, j, nm_platform_link_to_string (item, NULL, 0));
+ _LOGt ("link-get: add %3d -> %3d: %s", i, j, nm_platform_link_to_string (item, NULL, 0));
g_hash_table_remove (unseen, GINT_TO_POINTER (item->ifindex));
g_array_index (result, NMPlatformLink, j++) = *item;
@@ -488,7 +488,7 @@ nm_platform_link_get_all (NMPlatform *self)
* This can happen for veth pairs where each peer is parent of the other end. */
item = &g_array_index (links, NMPlatformLink, first_idx);
- _LOGT ("link-get: add (loop) %3d -> %3d: %s", first_idx, j, nm_platform_link_to_string (item, NULL, 0));
+ _LOGt ("link-get: add (loop) %3d -> %3d: %s", first_idx, j, nm_platform_link_to_string (item, NULL, 0));
g_hash_table_remove (unseen, GINT_TO_POINTER (item->ifindex));
g_array_index (result, NMPlatformLink, j++) = *item;
diff --git a/src/platform/nmp-object.c b/src/platform/nmp-object.c
index fbdc88771c..2264c9cd62 100644
--- a/src/platform/nmp-object.c
+++ b/src/platform/nmp-object.c
@@ -214,7 +214,7 @@ nmp_object_ref (NMPObject *obj)
g_return_val_if_fail (obj->_ref_count != NMP_REF_COUNT_STACKINIT, NULL);
obj->_ref_count++;
- _LOGT (obj, "ref: %d", obj->_ref_count);
+ _LOGt (obj, "ref: %d", obj->_ref_count);
return obj;
}
@@ -225,7 +225,7 @@ nmp_object_unref (NMPObject *obj)
if (obj) {
g_return_if_fail (obj->_ref_count > 0);
g_return_if_fail (obj->_ref_count != NMP_REF_COUNT_STACKINIT);
- _LOGT (obj, "%s: %d",
+ _LOGt (obj, "%s: %d",
obj->_ref_count <= 1 ? "destroy" : "unref",
obj->_ref_count - 1);
if (--obj->_ref_count <= 0) {
@@ -265,7 +265,7 @@ _nmp_object_new_from_class (const NMPClass *klass)
obj = g_slice_alloc0 (klass->sizeof_data + G_STRUCT_OFFSET (NMPObject, object));
obj->_class = klass;
obj->_ref_count = 1;
- _LOGT (obj, "new");
+ _LOGt (obj, "new");
return obj;
}
diff --git a/src/platform/tests/test-address.c b/src/platform/tests/test-address.c
index 2cdd29622b..a406c01431 100644
--- a/src/platform/tests/test-address.c
+++ b/src/platform/tests/test-address.c
@@ -350,7 +350,7 @@ _g_test_run (gconstpointer user_data)
const TestSetup *s = user_data;
int ifindex;
- _LOGt ("TEST: start %s", s->testpath);
+ _LOGT ("TEST: start %s", s->testpath);
nm_platform_link_delete (NM_PLATFORM_GET, nm_platform_link_get_ifindex (NM_PLATFORM_GET, DEVICE_NAME));
g_assert (!nm_platform_link_get_by_ifname (NM_PLATFORM_GET, DEVICE_NAME));
@@ -370,7 +370,7 @@ _g_test_run (gconstpointer user_data)
g_assert_cmpint (ifindex, ==, nm_platform_link_get_ifindex (NM_PLATFORM_GET, DEVICE_NAME));
g_assert (nm_platform_link_delete (NM_PLATFORM_GET, ifindex));
- _LOGt ("TEST: finished %s", s->testpath);
+ _LOGT ("TEST: finished %s", s->testpath);
}
static void
diff --git a/src/settings/nm-secret-agent.c b/src/settings/nm-secret-agent.c
index 29c0f55b4d..f819a9206b 100644
--- a/src/settings/nm-secret-agent.c
+++ b/src/settings/nm-secret-agent.c
@@ -118,7 +118,7 @@ request_new (NMSecretAgent *self,
r->callback = callback;
r->callback_data = callback_data;
r->cancellable = g_cancellable_new ();
- _LOGT ("request "LOG_REQ_FMT": created", LOG_REQ_ARG (r));
+ _LOGt ("request "LOG_REQ_FMT": created", LOG_REQ_ARG (r));
return r;
}
#define request_new(self,dbus_command,path,setting_name,callback,callback_data) request_new(self,""dbus_command"",path,setting_name,callback,callback_data)
@@ -128,7 +128,7 @@ request_free (Request *r)
{
NMSecretAgent *self = r->agent;
- _LOGT ("request "LOG_REQ_FMT": destroyed", LOG_REQ_ARG (r));
+ _LOGt ("request "LOG_REQ_FMT": destroyed", LOG_REQ_ARG (r));
g_free (r->path);
g_free (r->setting_name);
if (r->cancellable)
@@ -602,7 +602,7 @@ _on_disconnected_private_connection (NMBusManager *mgr,
if (priv->connection != connection)
return;
- _LOGT ("private connection disconnected");
+ _LOGt ("private connection disconnected");
_on_disconnected_cleanup (priv);
g_signal_emit (self, signals[DISCONNECTED], 0);
@@ -627,7 +627,7 @@ _on_disconnected_name_owner_changed (GDBusConnection *connection,
&old_owner,
&new_owner);
- _LOGT ("name-owner-changed: %s%s%s => %s%s%s",
+ _LOGt ("name-owner-changed: %s%s%s => %s%s%s",
NM_PRINT_FMT_QUOTE_STRING (old_owner),
NM_PRINT_FMT_QUOTE_STRING (new_owner));
@@ -681,7 +681,7 @@ nm_secret_agent_new (GDBusMethodInvocation *context,
priv->connection = g_object_ref (connection);
priv->connection_is_private = nm_bus_manager_connection_is_private (priv->bus_mgr, connection);
- _LOGT ("constructed: %s, owner=%s%s%s (%s), private-connection=%d, unique-name=%s%s%s",
+ _LOGt ("constructed: %s, owner=%s%s%s (%s), private-connection=%d, unique-name=%s%s%s",
(description = _create_description (dbus_owner, identifier, uid)),
NM_PRINT_FMT_QUOTE_STRING (owner_username),
nm_auth_subject_to_string (subject, buf_subject, sizeof (buf_subject)),
@@ -772,7 +772,7 @@ finalize (GObject *object)
G_OBJECT_CLASS (nm_secret_agent_parent_class)->finalize (object);
- _LOGT ("finalized");
+ _LOGt ("finalized");
}
static void