summaryrefslogtreecommitdiffstats
path: root/60xx/libsensors_iio/local_log_def.h
diff options
context:
space:
mode:
authorScott Warner <Tortel1210@gmail.com>2015-10-11 08:30:01 -0400
committerScott Warner <Tortel1210@gmail.com>2015-10-12 09:40:33 -0400
commit901b63272e2eb758fe2f4a588e6e9f308fe50f6c (patch)
treeeefd9603dc5f829b80bc7bb116e9de5ba4297714 /60xx/libsensors_iio/local_log_def.h
parente0c1691f695f828608c36315fa405db2fa8d153e (diff)
downloadandroid_hardware_invensense-901b63272e2eb758fe2f4a588e6e9f308fe50f6c.tar.gz
android_hardware_invensense-901b63272e2eb758fe2f4a588e6e9f308fe50f6c.tar.bz2
android_hardware_invensense-901b63272e2eb758fe2f4a588e6e9f308fe50f6c.zip
Revert "Remove files for unsupported devices."
This reverts commit f5f584ee173faef40f226c6e0e8580a2ecbe079b. Change-Id: I4e1b41922b5ccaac2314dac7f43df5740e2e9361
Diffstat (limited to '60xx/libsensors_iio/local_log_def.h')
-rw-r--r--60xx/libsensors_iio/local_log_def.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/60xx/libsensors_iio/local_log_def.h b/60xx/libsensors_iio/local_log_def.h
new file mode 100644
index 0000000..9135992
--- /dev/null
+++ b/60xx/libsensors_iio/local_log_def.h
@@ -0,0 +1,49 @@
+#ifndef LOCAL_LOG_DEF_H
+#define LOCAL_LOG_DEF_H
+
+/* 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 */
+
+#if defined ANDROID_JELLYBEAN
+#define LOGV ALOGV
+#define LOGV_IF ALOGV_IF
+#define LOGD ALOGD
+#define LOGD_IF ALOGD_IF
+#define LOGI ALOGI
+#define LOGI_IF ALOGI_IF
+#define LOGW ALOGW
+#define LOGW_IF ALOGW_IF
+#define LOGE ALOGE
+#define LOGE_IF ALOGE_IF
+#define IF_LOGV IF_ALOGV
+#define IF_LOGD IF_ALOGD
+#define IF_LOGI IF_ALOGI
+#define IF_LOGW IF_ALOGW
+#define IF_LOGE IF_ALOGE
+#define LOG_ASSERT ALOG_ASSERT
+#define LOG ALOG
+#define IF_LOG IF_ALOG
+#else
+#warning "build for ICS or earlier version"
+#endif
+
+
+#define FUNC_LOG \
+ LOGV("%s", __PRETTY_FUNCTION__)
+#define VFUNC_LOG \
+ LOGV_IF(FUNC_ENTRY, "Entering function '%s'", __PRETTY_FUNCTION__)
+#define VHANDLER_LOG \
+ LOGV_IF(HANDLER_ENTRY, "Entering handler '%s'", __PRETTY_FUNCTION__)
+
+#endif /*ifndef LOCAL_LOG_DEF_H */