Commit 60ba1a74 authored by Damien Riegel's avatar Damien Riegel Committed by gerrit2

android: Fix logger by redefining LOG_FORMAT

FILE_NAME is not const char*, it cannot be concatenated with the format
string at compile time, do it at runtime.

Issue: #79812
Change-Id: I9a0a3da4c0cbd66b23d32440509fc26cce0a0265
parent 118d782b
......@@ -83,6 +83,9 @@ void strErr();
#define APP_NAME "libdring"
#endif /* APP_NAME */
#undef LOG_FORMAT
#define LOG_FORMAT(M, ...) "%s:%d | " M, FILE_NAME, __LINE__, ##__VA_ARGS__
// Avoid printing whole path on android
#define FILE_NAME (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment