1 #ifndef LOCAL_LOG_DEF_H 2 #define LOCAL_LOG_DEF_H 3 4 /* Log enablers, each of these independent */ 5 6 #define PROCESS_VERBOSE (0) /* process log messages */ 7 #define EXTRA_VERBOSE (0) /* verbose log messages */ 8 #define SYSFS_VERBOSE (0) /* log sysfs interactions as cat/echo for repro 9 purpose on a shell */ 10 #define FUNC_ENTRY (0) /* log entry in all one-time functions */ 11 12 /* Note that enabling this logs may affect performance */ 13 #define HANDLER_ENTRY (0) /* log entry in all handler functions */ 14 #define ENG_VERBOSE (0) /* log some a lot more info about the internals */ 15 #define INPUT_DATA (0) /* log the data input from the events */ 16 #define HANDLER_DATA (0) /* log the data fetched from the handlers */ 17 18 #if defined ANDROID_JELLYBEAN 19 #define LOGV ALOGV 20 #define LOGV_IF ALOGV_IF 21 #define LOGD ALOGD 22 #define LOGD_IF ALOGD_IF 23 #define LOGI ALOGI 24 #define LOGI_IF ALOGI_IF 25 #define LOGW ALOGW 26 #define LOGW_IF ALOGW_IF 27 #define LOGE ALOGE 28 #define LOGE_IF ALOGE_IF 29 #define IF_LOGV IF_ALOGV 30 #define IF_LOGD IF_ALOGD 31 #define IF_LOGI IF_ALOGI 32 #define IF_LOGW IF_ALOGW 33 #define IF_LOGE IF_ALOGE 34 #define LOG_ASSERT ALOG_ASSERT 35 #define LOG ALOG 36 #define IF_LOG IF_ALOG 37 #else 38 #warning "build for ICS or earlier version" 39 #endif 40 41 42 #define FUNC_LOG \ 43 LOGV("%s", __PRETTY_FUNCTION__) 44 #define VFUNC_LOG \ 45 LOGV_IF(FUNC_ENTRY, "Entering function '%s'", __PRETTY_FUNCTION__) 46 #define VHANDLER_LOG \ 47 LOGV_IF(HANDLER_ENTRY, "Entering handler '%s'", __PRETTY_FUNCTION__) 48 49 #endif /*ifndef LOCAL_LOG_DEF_H */ 50