diff options
author | John Grossman <johngro@google.com> | 2012-04-20 13:31:13 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-04-20 13:31:13 -0700 |
commit | e4f0d1bd87c052c1b4af410599558de1e8875379 (patch) | |
tree | 9fd9424e25f38abf3ff45a0962ce190cf839ef7d | |
parent | 31182b2e5676319b0b9c8d5c1ef8eda85051de97 (diff) | |
parent | 6a7ffa31d45635b56558b9ba8bbd05fc002e1fa4 (diff) | |
download | external_dhcpcd-e4f0d1bd87c052c1b4af410599558de1e8875379.zip external_dhcpcd-e4f0d1bd87c052c1b4af410599558de1e8875379.tar.gz external_dhcpcd-e4f0d1bd87c052c1b4af410599558de1e8875379.tar.bz2 |
am 6a7ffa31: DHCPCD: Add the ability to redirect log to logcat.
* commit '6a7ffa31d45635b56558b9ba8bbd05fc002e1fa4':
DHCPCD: Add the ability to redirect log to logcat.
-rw-r--r-- | common.h | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -79,4 +79,33 @@ void *xmalloc(size_t); void *xzalloc(size_t); char *xstrdup(const char *); +/* Uncomment the #def below to send DHCPCD syslog messages to Android's logcat + * instead. */ +/* #define REDIRECT_SYSLOG_TO_ANDROID_LOGCAT */ +#ifdef REDIRECT_SYSLOG_TO_ANDROID_LOGCAT + +#define LOG_TAG "DHCPCD" +#include <utils/Log.h> + +#undef LOG_EMERG +#undef LOG_ALERT +#undef LOG_CRIT +#undef LOG_ERR +#undef LOG_WARNING +#undef LOG_NOTICE +#undef LOG_INFO +#undef LOG_DEBUG + +#define LOG_EMERG ANDROID_LOG_FATAL +#define LOG_ALERT ANDROID_LOG_FATAL +#define LOG_CRIT ANDROID_LOG_FATAL +#define LOG_ERR ANDROID_LOG_ERROR +#define LOG_WARNING ANDROID_LOG_WARN +#define LOG_NOTICE ANDROID_LOG_WARN +#define LOG_INFO ANDROID_LOG_INFO +#define LOG_DEBUG ANDROID_LOG_DEBUG +#define syslog(a, b...) android_printLog(a, LOG_TAG, b) + +#endif /* REDIRECT_SYSLOG_TO_ANDROID_LOGCAT */ + #endif |