Improve Implemetation of TRACE APIs
The implementation of TRACE APIs (BTIF_TRACE_ERROR etc) calls LogMsg, which in turn uses LOG_XXX macros to emit logs. The source location contained in the emitted logs all point to the place in LogMsg where LOG_XXX macros are called, instead of the TRACE statements. This patch changes the signature of LogMsg to take the source location (file, line num, func name) of the TRACE statements and dump it TRACE statements via LogMsg. To avoid logging duplicated source location emitted by LOG_XXX APIs, a series of LOG_XXX_INT macros are introduced, which do not include source location , and LOG_XXX APIs are implemented based in LOG_XXX_INT by adding the source location back. Bug: 264946508 Test: mma package/modules/Bluetooth Change-Id: I8d0816af48d1c3658421fc89620b60566618c296
Loading
Please register or sign in to comment