summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2016-03-11 17:55:11 +0100
committerAndreas Schneider <asn@cryptomilk.org>2016-03-11 18:15:01 +0100
commit6df20cb2f5abdb37af0e87b3b02c681db9215c0a (patch)
tree40fcfc10444d44f63df511a98da5122db6d835f4
parent6bb500fcd8f9ffda0a2efed906e13712b761c430 (diff)
downloadandroid_hardware_samsung_slsi_exynos5430-6df20cb2f5abdb37af0e87b3b02c681db9215c0a.tar.gz
android_hardware_samsung_slsi_exynos5430-6df20cb2f5abdb37af0e87b3b02c681db9215c0a.tar.xz
android_hardware_samsung_slsi_exynos5430-6df20cb2f5abdb37af0e87b3b02c681db9215c0a.zip
mobicore: Fix logging system
Finally we get readable error messages. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--mobicore/common/LogWrapper/log.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/mobicore/common/LogWrapper/log.h b/mobicore/common/LogWrapper/log.h
index 78c9f94..07d0872 100644
--- a/mobicore/common/LogWrapper/log.h
+++ b/mobicore/common/LogWrapper/log.h
@@ -78,11 +78,10 @@
#define LOG_W(fmt, args...) DUMMY_FUNCTION()
#else
// add LINE
- #define LOG_I(fmt, args...) LOG_i(fmt ";%d", ## args, __LINE__)
- #define LOG_W(fmt, args...) LOG_w(fmt ";%d", ## args, __LINE__)
+ #define LOG_I(fmt, args...) LOG_i(fmt , ## args)
+ #define LOG_W(fmt, args...) LOG_w(fmt , ## args)
#endif
- // LOG_E is always defined
- #define _LOG_E(fmt, args...) LOG_e(fmt, ## args)
+ #define LOG_E(fmt, args...) LOG_e("ERROR - %s():\n***** " fmt, __FUNCTION__, ## args)
// actually mapping to log system, adding level and tag.
#define LOG_i(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
@@ -125,6 +124,7 @@
#define LOG_V(...) DUMMY_FUNCTION()
#endif
+#if 0
/** LOG_E() needs to be more prominent:
* Display "*********** ERROR ***********" before actual error message.
*/
@@ -136,9 +136,10 @@
_LOG_E(" *** Detected in %s/%u()", __FUNCTION__, __LINE__); \
_LOG_E(" *****************************"); \
} while(1!=1)
+#endif
#define LOG_ERRNO(MESSAGE) \
- LOG_E("%s failed with \"%s\"(errno %i)", MESSAGE, strerror(errno), errno);
+ LOG_E("%s -- %s (errno %d)", MESSAGE, strerror(errno), errno);
#define LOG_I_BUF LOG_I_Buf