summaryrefslogtreecommitdiff
path: root/libsensors_iio/local_log_def.h
diff options
context:
space:
mode:
Diffstat (limited to 'libsensors_iio/local_log_def.h')
-rw-r--r--libsensors_iio/local_log_def.h35
1 files changed, 19 insertions, 16 deletions
diff --git a/libsensors_iio/local_log_def.h b/libsensors_iio/local_log_def.h
index b08fdf1..4127dd7 100644
--- a/libsensors_iio/local_log_def.h
+++ b/libsensors_iio/local_log_def.h
@@ -1,7 +1,24 @@
#ifndef LOCAL_LOG_DEF_H
#define LOCAL_LOG_DEF_H
-// -- workaround for different LOG definition in JellyBean --
+/* comment this line if Android OS is ICS and prior */
+#define ANDROID_VERSION_JB (1)
+
+/* Log enablers, each of these independent */
+
+#define PROCESS_VERBOSE (0) /* process log messages */
+#define EXTRA_VERBOSE (0) /* verbose log messages */
+#define SYSFS_VERBOSE (0) /* log sysfs interactions as cat/echo for repro
+ purpose on a shell */
+#define FUNC_ENTRY (0) /* log entry in all one-time functions */
+
+/* Note that enabling this logs may affect performance */
+#define HANDLER_ENTRY (0) /* log entry in all handler functions */
+#define ENG_VERBOSE (0) /* log some a lot more info about the internals */
+#define INPUT_DATA (0) /* log the data input from the events */
+#define HANDLER_DATA (0) /* log the data fetched from the handlers */
+
+#ifdef ANDROID_VERSION_JB
#define LOGV ALOGV
#define LOGV_IF ALOGV_IF
#define LOGD ALOGD
@@ -20,21 +37,7 @@
#define LOG_ASSERT ALOG_ASSERT
#define LOG ALOG
#define IF_LOG IF_ALOG
-// -- Workaround End --
-
-/* Log enablers, each of these independent */
-
-#define PROCESS_VERBOSE (0) /* process log messages */
-#define EXTRA_VERBOSE (0) /* verbose log messages */
-#define SYSFS_VERBOSE (0) /* log sysfs interactions as cat/echo for repro
- purpose on a shell */
-#define FUNC_ENTRY (0) /* log entry in all one-time functions */
-
-/* Note that enabling this logs may affect performance */
-#define HANDLER_ENTRY (0) /* log entry in all handler functions */
-#define ENG_VERBOSE (0) /* log some a lot more info about the internals */
-#define INPUT_DATA (0) /* log the data input from the events */
-#define HANDLER_DATA (0) /* log the data fetched from the handlers */
+#endif
#define FUNC_LOG \
LOGV("%s", __PRETTY_FUNCTION__)