summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-10-20 11:54:09 +0100
committerSteve Block <steveblock@google.com>2012-01-17 17:56:18 +0000
commit66b68757f680ac9262e46f3c7b8cb748c7d99f05 (patch)
tree4ef19517d1b08378d9406282936421c3bd05f40c /include
parent61fbcbe9761bbfdebb0b1f8147faf00cbb1c6e6a (diff)
downloadsystem_core-66b68757f680ac9262e46f3c7b8cb748c7d99f05.zip
system_core-66b68757f680ac9262e46f3c7b8cb748c7d99f05.tar.gz
system_core-66b68757f680ac9262e46f3c7b8cb748c7d99f05.tar.bz2
Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF)
Change-Id: Ia9a357dec5ad12eea93fd03401a3b02b38e4e94f
Diffstat (limited to 'include')
-rw-r--r--include/cutils/log.h35
1 files changed, 22 insertions, 13 deletions
diff --git a/include/cutils/log.h b/include/cutils/log.h
index 4abd774..fe711ef 100644
--- a/include/cutils/log.h
+++ b/include/cutils/log.h
@@ -47,7 +47,7 @@ extern "C" {
// ---------------------------------------------------------------------
/*
- * Normally we strip LOGV (VERBOSE messages) from release builds.
+ * Normally we strip ALOGV (VERBOSE messages) from release builds.
* You can modify this (for example with "#define LOG_NDEBUG 0"
* at the top of your source file) to change that behavior.
*/
@@ -73,27 +73,33 @@ extern "C" {
/*
* Simplified macro to send a verbose log message using the current LOG_TAG.
*/
-#ifndef LOGV
+#ifndef ALOGV
#if LOG_NDEBUG
-#define LOGV(...) ((void)0)
+#define ALOGV(...) ((void)0)
#else
-#define LOGV(...) ((void)ALOG(LOG_VERBOSE, LOG_TAG, __VA_ARGS__))
+#define ALOGV(...) ((void)ALOG(LOG_VERBOSE, LOG_TAG, __VA_ARGS__))
+#endif
+// Temporary measure for code still using old LOG macros.
+#ifndef LOGV
+#define LOGV ALOGV
#endif
-#define ALOGV LOGV
#endif
#define CONDITION(cond) (__builtin_expect((cond)!=0, 0))
-#ifndef LOGV_IF
+#ifndef ALOGV_IF
#if LOG_NDEBUG
-#define LOGV_IF(cond, ...) ((void)0)
+#define ALOGV_IF(cond, ...) ((void)0)
#else
-#define LOGV_IF(cond, ...) \
+#define ALOGV_IF(cond, ...) \
( (CONDITION(cond)) \
? ((void)ALOG(LOG_VERBOSE, LOG_TAG, __VA_ARGS__)) \
: (void)0 )
#endif
-#define ALOGV_IF LOGV_IF
+// Temporary measure for code still using old LOG macros.
+#ifndef LOGV_IF
+#define LOGV_IF ALOGV_IF
+#endif
#endif
/*
@@ -166,13 +172,16 @@ extern "C" {
* Conditional based on whether the current LOG_TAG is enabled at
* verbose priority.
*/
-#ifndef IF_LOGV
+#ifndef IF_ALOGV
#if LOG_NDEBUG
-#define IF_LOGV() if (false)
+#define IF_ALOGV() if (false)
#else
-#define IF_LOGV() IF_ALOG(LOG_VERBOSE, LOG_TAG)
+#define IF_ALOGV() IF_ALOG(LOG_VERBOSE, LOG_TAG)
+#endif
+// Temporary measure for code still using old LOG macros.
+#ifndef IF_LOGV
+#define IF_LOGV IF_ALOGV
#endif
-#define IF_ALOGV IF_LOGV
#endif
/*