diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2010-03-29 16:05:50 -0700 |
---|---|---|
committer | Dmitry Shmidt <dimitrysh@google.com> | 2010-03-29 16:06:43 -0700 |
commit | 9661983ab7964d195432d905f721f9dd59163edc (patch) | |
tree | 86a187205627ae1d9422c70b565dd0ec588b254e | |
parent | 79b0ee37ec241bd7003b444513d76b1536c3e7cc (diff) | |
download | external_dhcpcd-9661983ab7964d195432d905f721f9dd59163edc.zip external_dhcpcd-9661983ab7964d195432d905f721f9dd59163edc.tar.gz external_dhcpcd-9661983ab7964d195432d905f721f9dd59163edc.tar.bz2 |
Leave only error messages
Change-Id: Icd6f44019098c62aa2aaa0845a28beb95120bd62
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
-rw-r--r-- | logger.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -39,7 +39,7 @@ #include <android/log.h> #endif -static int loglevel = LOG_INFO; +static int loglevel = LOG_ERR; static char logprefix[12] = {0}; void @@ -64,12 +64,14 @@ logger(int level, const char *fmt, ...) va_start(p, fmt); #ifdef ANDROID - if (level <= LOG_ERR) { - level = ANDROID_LOG_ERROR; - } else { - level = ANDROID_LOG_DEBUG; + if (level <= loglevel) { + if (level <= LOG_ERR) { + level = ANDROID_LOG_ERROR; + } else { + level = ANDROID_LOG_DEBUG; + } + __android_log_vprint(level, "dhcpcd", fmt, p); } - __android_log_vprint(level, "dhcpcd", fmt, p); #else va_copy(p2, p); |