Loading include/cutils/log.h +16 −7 Original line number Diff line number Diff line Loading @@ -127,17 +127,23 @@ extern "C" { /* * Simplified macro to send an info log message using the current LOG_TAG. */ #ifndef ALOGI #define ALOGI(...) ((void)ALOG(LOG_INFO, LOG_TAG, __VA_ARGS__)) // Temporary measure for code still using old LOG macros. #ifndef LOGI #define LOGI(...) ((void)ALOG(LOG_INFO, LOG_TAG, __VA_ARGS__)) #define ALOGI LOGI #define LOGI ALOGI #endif #endif #ifndef LOGI_IF #define LOGI_IF(cond, ...) \ #ifndef ALOGI_IF #define ALOGI_IF(cond, ...) \ ( (CONDITION(cond)) \ ? ((void)ALOG(LOG_INFO, LOG_TAG, __VA_ARGS__)) \ : (void)0 ) #define ALOGI_IF LOGI_IF // Temporary measure for code still using old LOG macros. #ifndef LOGI_IF #define LOGI_IF ALOGI_IF #endif #endif /* Loading Loading @@ -206,9 +212,12 @@ extern "C" { * Conditional based on whether the current LOG_TAG is enabled at * info priority. */ #ifndef IF_ALOGI #define IF_ALOGI() IF_ALOG(LOG_INFO, LOG_TAG) // Temporary measure for code still using old LOG macros. #ifndef IF_LOGI #define IF_LOGI() IF_ALOG(LOG_INFO, LOG_TAG) #define IF_ALOGI IF_LOGI #define IF_LOGI IF_ALOGI #endif #endif /* Loading libcutils/loghack.h +1 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ ((void)printf("cutils:" level "/" LOG_TAG ": " __VA_ARGS__)) #define ALOGV(...) ALOG("V", __VA_ARGS__) #define ALOGD(...) ALOG("D", __VA_ARGS__) #define LOGI(...) ALOG("I", __VA_ARGS__) #define ALOGI(...) 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) Loading libcutils/mq.c +5 −5 Original line number Diff line number Diff line Loading @@ -374,10 +374,10 @@ static bool peerProxyRemoveConnection(void* key, void* value, void* context) { */ static void peerProxyKill(PeerProxy* peerProxy, bool errnoIsSet) { if (errnoIsSet) { LOGI("Peer %d died. errno: %s", peerProxy->credentials.pid, ALOGI("Peer %d died. errno: %s", peerProxy->credentials.pid, strerror(errno)); } else { LOGI("Peer %d died.", peerProxy->credentials.pid); ALOGI("Peer %d died.", peerProxy->credentials.pid); } // If we lost the master, we're up a creek. We can't let this happen. Loading Loading @@ -902,7 +902,7 @@ static void masterProxyHandleConnectionError(PeerProxy* masterProxy, peerUnlock(peer); if (peerProxy != NULL) { LOGI("Couldn't connect to %d.", pid); ALOGI("Couldn't connect to %d.", pid); peerProxyKill(peerProxy, false); } else { LOGW("Peer proxy for %d not found. This shouldn't happen.", pid); Loading Loading @@ -947,7 +947,7 @@ static bool peerProxyBufferInput(PeerProxy* peerProxy) { return false; } else if (size == 0) { // EOF. LOGI("EOF"); ALOGI("EOF"); peerProxyKill(peerProxy, false); return false; } else if (bufferReadComplete(in)) { Loading Loading @@ -1050,7 +1050,7 @@ static void masterAcceptConnection(SelectableFd* listenerFd) { credentials.uid = ucredentials.uid; credentials.gid = ucredentials.gid; LOGI("Accepted connection from process %d.", credentials.pid); ALOGI("Accepted connection from process %d.", credentials.pid); Peer* masterPeer = (Peer*) listenerFd->data; Loading libcutils/qtaguid.c +4 −4 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ static int write_ctrl(const char *cmd) { savedErrno = 0; } if (res < 0) { LOGI("Failed write_ctrl(%s) res=%d errno=%d", cmd, res, savedErrno); ALOGI("Failed write_ctrl(%s) res=%d errno=%d", cmd, res, savedErrno); } close(fd); return -savedErrno; Loading Loading @@ -111,7 +111,7 @@ int qtaguid_tagSocket(int sockfd, int tag, uid_t uid) { res = write_ctrl(lineBuf); if (res < 0) { LOGI("Tagging socket %d with tag %llx(%d) for uid %d failed errno=%d", ALOGI("Tagging socket %d with tag %llx(%d) for uid %d failed errno=%d", sockfd, kTag, tag, uid, res); } Loading @@ -127,7 +127,7 @@ int qtaguid_untagSocket(int sockfd) { snprintf(lineBuf, sizeof(lineBuf), "u %d", sockfd); res = write_ctrl(lineBuf); if (res < 0) { LOGI("Untagging socket %d failed errno=%d", sockfd, res); ALOGI("Untagging socket %d failed errno=%d", sockfd, res); } return res; Loading Loading @@ -156,7 +156,7 @@ int qtaguid_deleteTagData(int tag, uid_t uid) { snprintf(lineBuf, sizeof(lineBuf), "d %llu %d", kTag, uid); res = write_ctrl(lineBuf); if (res < 0) { LOGI("Deleteing tag data with tag %llx/%d for uid %d failed with cnt=%d errno=%d", ALOGI("Deleteing tag data with tag %llx/%d for uid %d failed with cnt=%d errno=%d", kTag, tag, uid, cnt, errno); } Loading libcutils/selector.c +3 −3 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ static void eatWakeupData(SelectableFd* wakeupFd) { static char garbage[64]; if (read(wakeupFd->fd, garbage, sizeof(garbage)) < 0) { if (errno == EINTR) { LOGI("read() interrupted."); ALOGI("read() interrupted."); } else { LOG_ALWAYS_FATAL("This should never happen: %s", strerror(errno)); } Loading Loading @@ -77,7 +77,7 @@ void selectorWakeUp(Selector* selector) { static char garbage[1]; if (write(selector->wakeupPipe[1], garbage, sizeof(garbage)) < 0) { if (errno == EINTR) { LOGI("read() interrupted."); ALOGI("read() interrupted."); } else { LOG_ALWAYS_FATAL("This should never happen: %s", strerror(errno)); } Loading Loading @@ -251,7 +251,7 @@ void selectorLoop(Selector* selector) { if (result == -1) { // Abort on everything except EINTR. if (errno == EINTR) { LOGI("select() interrupted."); ALOGI("select() interrupted."); } else { LOG_ALWAYS_FATAL("select() error: %s", strerror(errno)); Loading Loading
include/cutils/log.h +16 −7 Original line number Diff line number Diff line Loading @@ -127,17 +127,23 @@ extern "C" { /* * Simplified macro to send an info log message using the current LOG_TAG. */ #ifndef ALOGI #define ALOGI(...) ((void)ALOG(LOG_INFO, LOG_TAG, __VA_ARGS__)) // Temporary measure for code still using old LOG macros. #ifndef LOGI #define LOGI(...) ((void)ALOG(LOG_INFO, LOG_TAG, __VA_ARGS__)) #define ALOGI LOGI #define LOGI ALOGI #endif #endif #ifndef LOGI_IF #define LOGI_IF(cond, ...) \ #ifndef ALOGI_IF #define ALOGI_IF(cond, ...) \ ( (CONDITION(cond)) \ ? ((void)ALOG(LOG_INFO, LOG_TAG, __VA_ARGS__)) \ : (void)0 ) #define ALOGI_IF LOGI_IF // Temporary measure for code still using old LOG macros. #ifndef LOGI_IF #define LOGI_IF ALOGI_IF #endif #endif /* Loading Loading @@ -206,9 +212,12 @@ extern "C" { * Conditional based on whether the current LOG_TAG is enabled at * info priority. */ #ifndef IF_ALOGI #define IF_ALOGI() IF_ALOG(LOG_INFO, LOG_TAG) // Temporary measure for code still using old LOG macros. #ifndef IF_LOGI #define IF_LOGI() IF_ALOG(LOG_INFO, LOG_TAG) #define IF_ALOGI IF_LOGI #define IF_LOGI IF_ALOGI #endif #endif /* Loading
libcutils/loghack.h +1 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ ((void)printf("cutils:" level "/" LOG_TAG ": " __VA_ARGS__)) #define ALOGV(...) ALOG("V", __VA_ARGS__) #define ALOGD(...) ALOG("D", __VA_ARGS__) #define LOGI(...) ALOG("I", __VA_ARGS__) #define ALOGI(...) 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) Loading
libcutils/mq.c +5 −5 Original line number Diff line number Diff line Loading @@ -374,10 +374,10 @@ static bool peerProxyRemoveConnection(void* key, void* value, void* context) { */ static void peerProxyKill(PeerProxy* peerProxy, bool errnoIsSet) { if (errnoIsSet) { LOGI("Peer %d died. errno: %s", peerProxy->credentials.pid, ALOGI("Peer %d died. errno: %s", peerProxy->credentials.pid, strerror(errno)); } else { LOGI("Peer %d died.", peerProxy->credentials.pid); ALOGI("Peer %d died.", peerProxy->credentials.pid); } // If we lost the master, we're up a creek. We can't let this happen. Loading Loading @@ -902,7 +902,7 @@ static void masterProxyHandleConnectionError(PeerProxy* masterProxy, peerUnlock(peer); if (peerProxy != NULL) { LOGI("Couldn't connect to %d.", pid); ALOGI("Couldn't connect to %d.", pid); peerProxyKill(peerProxy, false); } else { LOGW("Peer proxy for %d not found. This shouldn't happen.", pid); Loading Loading @@ -947,7 +947,7 @@ static bool peerProxyBufferInput(PeerProxy* peerProxy) { return false; } else if (size == 0) { // EOF. LOGI("EOF"); ALOGI("EOF"); peerProxyKill(peerProxy, false); return false; } else if (bufferReadComplete(in)) { Loading Loading @@ -1050,7 +1050,7 @@ static void masterAcceptConnection(SelectableFd* listenerFd) { credentials.uid = ucredentials.uid; credentials.gid = ucredentials.gid; LOGI("Accepted connection from process %d.", credentials.pid); ALOGI("Accepted connection from process %d.", credentials.pid); Peer* masterPeer = (Peer*) listenerFd->data; Loading
libcutils/qtaguid.c +4 −4 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ static int write_ctrl(const char *cmd) { savedErrno = 0; } if (res < 0) { LOGI("Failed write_ctrl(%s) res=%d errno=%d", cmd, res, savedErrno); ALOGI("Failed write_ctrl(%s) res=%d errno=%d", cmd, res, savedErrno); } close(fd); return -savedErrno; Loading Loading @@ -111,7 +111,7 @@ int qtaguid_tagSocket(int sockfd, int tag, uid_t uid) { res = write_ctrl(lineBuf); if (res < 0) { LOGI("Tagging socket %d with tag %llx(%d) for uid %d failed errno=%d", ALOGI("Tagging socket %d with tag %llx(%d) for uid %d failed errno=%d", sockfd, kTag, tag, uid, res); } Loading @@ -127,7 +127,7 @@ int qtaguid_untagSocket(int sockfd) { snprintf(lineBuf, sizeof(lineBuf), "u %d", sockfd); res = write_ctrl(lineBuf); if (res < 0) { LOGI("Untagging socket %d failed errno=%d", sockfd, res); ALOGI("Untagging socket %d failed errno=%d", sockfd, res); } return res; Loading Loading @@ -156,7 +156,7 @@ int qtaguid_deleteTagData(int tag, uid_t uid) { snprintf(lineBuf, sizeof(lineBuf), "d %llu %d", kTag, uid); res = write_ctrl(lineBuf); if (res < 0) { LOGI("Deleteing tag data with tag %llx/%d for uid %d failed with cnt=%d errno=%d", ALOGI("Deleteing tag data with tag %llx/%d for uid %d failed with cnt=%d errno=%d", kTag, tag, uid, cnt, errno); } Loading
libcutils/selector.c +3 −3 Original line number Diff line number Diff line Loading @@ -48,7 +48,7 @@ static void eatWakeupData(SelectableFd* wakeupFd) { static char garbage[64]; if (read(wakeupFd->fd, garbage, sizeof(garbage)) < 0) { if (errno == EINTR) { LOGI("read() interrupted."); ALOGI("read() interrupted."); } else { LOG_ALWAYS_FATAL("This should never happen: %s", strerror(errno)); } Loading Loading @@ -77,7 +77,7 @@ void selectorWakeUp(Selector* selector) { static char garbage[1]; if (write(selector->wakeupPipe[1], garbage, sizeof(garbage)) < 0) { if (errno == EINTR) { LOGI("read() interrupted."); ALOGI("read() interrupted."); } else { LOG_ALWAYS_FATAL("This should never happen: %s", strerror(errno)); } Loading Loading @@ -251,7 +251,7 @@ void selectorLoop(Selector* selector) { if (result == -1) { // Abort on everything except EINTR. if (errno == EINTR) { LOGI("select() interrupted."); ALOGI("select() interrupted."); } else { LOG_ALWAYS_FATAL("select() error: %s", strerror(errno)); Loading