Message ID | 20231128230847.1224497-1-gerickson@nuovations.com (mailing list archive) |
---|---|
Headers | show |
Series | connection: Improve Connection Gateway Debugging and Documentation | expand |
This improves connection gateway debugging with the following changes: * This introduces and leverages two functions 'gateway_{config,data}_debug' to conditionally log gateway data and configuration at the debug level. * Expands, exhances, and refactors 'DBG' statements throughout the module to improve symmetry in content, aid in debugging, and to reflect the newly-leveraged 'GATEWAY_CONFIG_DBG' and 'GATEWAY_DATA_DBG' macro which, in turn, are wrappers around 'gateway_{config,data}_debug'. In addition, this adds to or expands on function- and body-level documentation for: * connection_{add,del}gateway * __connman_connection_gateway_{add,remove} * __connman_connection_update_gateway The aforementioned 'GATEWAY_CONFIG_DBG' and 'GATEWAY_DATA_DBG' are supported by log module changes, including: * Introduces 'CONNMAN_DEBUG_DESC_INSTANTIATE' which declares and instantiates an instance of 'connman_debug_desc'. * Replaces 'CONNMAN_DEBUG_DEFINE' with 'CONNMAN_DEBUG_ALIAS' which declares and instantiates an alias (that is, asserts the 'CONNMAN_DEBUG_FLAG_ALIAS' flag) instance of 'connmand_debug_desc', using 'CONNMAN_DEBUG_DESC_INSTANTIATE'. * Redefines 'DBG' against 'CONNMAN_DEBUG_DESC_INSTANTIATE' with '__func__' as the function parameter. Grant Erickson (8): log: Refactor debugging preprocessor macros. log: Document debugging preprocessor macros. connection: Introduce and leverage 'gateway_{config,data}_debug'. connection: Document 'gateway_{config,data}_debug'. connection: Expand, Enhance, and Refactor 'DBG'. connection: Document 'connection_{add,del}gateway'. connection: Document '__connman_connection_gateway_{add,remove}'. connection: Document '__connman_connection_update_gateway'. include/log.h | 99 +++++++++--- src/connection.c | 390 +++++++++++++++++++++++++++++++++++++++++++++-- src/log.c | 2 +- 3 files changed, 461 insertions(+), 30 deletions(-)