Skip to content
Snippets Groups Projects
Commit 60ba1a74 authored by Damien Riegel's avatar Damien Riegel Committed by gerrit2
Browse files

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
No related branches found
No related tags found
No related merge requests found
...@@ -83,6 +83,9 @@ void strErr(); ...@@ -83,6 +83,9 @@ void strErr();
#define APP_NAME "libdring" #define APP_NAME "libdring"
#endif /* APP_NAME */ #endif /* APP_NAME */
#undef LOG_FORMAT
#define LOG_FORMAT(M, ...) "%s:%d | " M, FILE_NAME, __LINE__, ##__VA_ARGS__
// Avoid printing whole path on android // Avoid printing whole path on android
#define FILE_NAME (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) #define FILE_NAME (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment