diff options
Diffstat (limited to 'libcutils')
-rw-r--r-- | libcutils/loghack.h | 12 | ||||
-rw-r--r-- | libcutils/properties.c | 10 | ||||
-rw-r--r-- | libcutils/qtaguid.c | 10 | ||||
-rw-r--r-- | libcutils/str_parms.c | 4 |
4 files changed, 18 insertions, 18 deletions
diff --git a/libcutils/loghack.h b/libcutils/loghack.h index 2bfffe4..52dfc8c 100644 --- a/libcutils/loghack.h +++ b/libcutils/loghack.h @@ -25,13 +25,13 @@ #include <cutils/log.h> #else #include <stdio.h> -#define LOG(level, ...) \ +#define ALOG(level, ...) \ ((void)printf("cutils:" level "/" LOG_TAG ": " __VA_ARGS__)) -#define LOGV(...) LOG("V", __VA_ARGS__) -#define LOGD(...) LOG("D", __VA_ARGS__) -#define LOGI(...) LOG("I", __VA_ARGS__) -#define LOGW(...) LOG("W", __VA_ARGS__) -#define LOGE(...) LOG("E", __VA_ARGS__) +#define ALOGV(...) ALOG("V", __VA_ARGS__) +#define LOGD(...) ALOG("D", __VA_ARGS__) +#define LOGI(...) ALOG("I", __VA_ARGS__) +#define LOGW(...) ALOG("W", __VA_ARGS__) +#define LOGE(...) ALOG("E", __VA_ARGS__) #define LOG_ALWAYS_FATAL(...) do { LOGE(__VA_ARGS__); exit(1); } while (0) #endif diff --git a/libcutils/properties.c b/libcutils/properties.c index 98f356b..98dbf50 100644 --- a/libcutils/properties.c +++ b/libcutils/properties.c @@ -130,7 +130,7 @@ static void init(void) if (gPropFd < 0) { //LOGW("not connected to system property server\n"); } else { - //LOGV("Connected to system property server\n"); + //ALOGV("Connected to system property server\n"); } } @@ -140,7 +140,7 @@ int property_get(const char *key, char *value, const char *default_value) char recvBuf[1+PROPERTY_VALUE_MAX]; int len = -1; - //LOGV("PROPERTY GET [%s]\n", key); + //ALOGV("PROPERTY GET [%s]\n", key); pthread_once(&gInitOnce, init); if (gPropFd < 0) { @@ -194,7 +194,7 @@ int property_get(const char *key, char *value, const char *default_value) assert(0); return -1; } - //LOGV("PROP [found=%d def='%s'] (%d) [%s]: [%s]\n", + //ALOGV("PROP [found=%d def='%s'] (%d) [%s]: [%s]\n", // recvBuf[0], default_value, len, key, value); return len; @@ -207,7 +207,7 @@ int property_set(const char *key, const char *value) char recvBuf[1]; int result = -1; - //LOGV("PROPERTY SET [%s]: [%s]\n", key, value); + //ALOGV("PROPERTY SET [%s]: [%s]\n", key, value); pthread_once(&gInitOnce, init); if (gPropFd < 0) @@ -241,7 +241,7 @@ int property_set(const char *key, const char *value) int property_list(void (*propfn)(const char *key, const char *value, void *cookie), void *cookie) { - //LOGV("PROPERTY LIST\n"); + //ALOGV("PROPERTY LIST\n"); pthread_once(&gInitOnce, init); if (gPropFd < 0) return -1; diff --git a/libcutils/qtaguid.c b/libcutils/qtaguid.c index 994ad32..fee67fd 100644 --- a/libcutils/qtaguid.c +++ b/libcutils/qtaguid.c @@ -60,7 +60,7 @@ void qtaguid_resTrack(void) { static int write_ctrl(const char *cmd) { int fd, res, savedErrno; - LOGV("write_ctrl(%s)", cmd); + ALOGV("write_ctrl(%s)", cmd); fd = TEMP_FAILURE_RETRY(open(CTRL_PROCPATH, O_WRONLY)); if (fd < 0) { @@ -107,7 +107,7 @@ int qtaguid_tagSocket(int sockfd, int tag, uid_t uid) { snprintf(lineBuf, sizeof(lineBuf), "t %d %llu %d", sockfd, kTag, uid); - LOGV("Tagging socket %d with tag %llx{%u,0} for uid %d", sockfd, kTag, tag, uid); + ALOGV("Tagging socket %d with tag %llx{%u,0} for uid %d", sockfd, kTag, tag, uid); res = write_ctrl(lineBuf); if (res < 0) { @@ -122,7 +122,7 @@ int qtaguid_untagSocket(int sockfd) { char lineBuf[CTRL_MAX_INPUT_LEN]; int res; - LOGV("Untagging socket %d", sockfd); + ALOGV("Untagging socket %d", sockfd); snprintf(lineBuf, sizeof(lineBuf), "u %d", sockfd); res = write_ctrl(lineBuf); @@ -137,7 +137,7 @@ int qtaguid_setCounterSet(int counterSetNum, uid_t uid) { char lineBuf[CTRL_MAX_INPUT_LEN]; int res; - LOGV("Setting counters to set %d for uid %d", counterSetNum, uid); + ALOGV("Setting counters to set %d for uid %d", counterSetNum, uid); snprintf(lineBuf, sizeof(lineBuf), "s %d %d", counterSetNum, uid); res = write_ctrl(lineBuf); @@ -149,7 +149,7 @@ int qtaguid_deleteTagData(int tag, uid_t uid) { int fd, cnt = 0, res = 0; uint64_t kTag = (uint64_t)tag << 32; - LOGV("Deleting tag data with tag %llx{%d,0} for uid %d", kTag, tag, uid); + ALOGV("Deleting tag data with tag %llx{%d,0} for uid %d", kTag, tag, uid); pthread_once(&resTrackInitDone, qtaguid_resTrack); diff --git a/libcutils/str_parms.c b/libcutils/str_parms.c index dfa1f73..7ea65ce 100644 --- a/libcutils/str_parms.c +++ b/libcutils/str_parms.c @@ -103,7 +103,7 @@ struct str_parms *str_parms_create_str(const char *_string) if (!str) goto err_strdup; - LOGV("%s: source string == '%s'\n", __func__, _string); + ALOGV("%s: source string == '%s'\n", __func__, _string); kvpair = strtok_r(str, ";", &tmpstr); while (kvpair && *kvpair) { @@ -137,7 +137,7 @@ next_pair: } if (!items) - LOGV("%s: no items found in string\n", __func__); + ALOGV("%s: no items found in string\n", __func__); free(str); |