Hi Marcel:
Below is the patch that can add the time information( tv_sec) into debug info.
It is useful when track the response time of dhclient or wpa_supplicant.
Not sure whether it can be added into upstream.
diff --git a/include/log.h b/include/log.h
index e9ee8e4..a1fb141 100644
--- a/include/log.h
+++ b/include/log.h
@@ -44,7 +44,11 @@ extern void connman_debug(const char *format, ...);
* Simple macro around connman_debug() which also include the function
* name it is called in.
*/
-#define DBG(fmt, arg...) connman_debug("%s:%s() " fmt, __FILE__, __FUNCTION__
, ## arg)
+#define DBG(fmt, arg...) do { \
+ GTimeVal time_val; \
+ g_get_current_time(&time_val);\
+ connman_debug("[%lu] %s:%s() " fmt, time_val.tv_sec, __FILE__, __FUNCTION__
,## arg);\
+} while(0)
#ifdef __cplusplus
}
_______________________________________________
connman mailing list
[email protected]
https://lists.moblin.org/mailman/listinfo/connman