aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2011-10-18 15:05:51 +0200
committerTobias Brunner <tobias@strongswan.org>2011-10-18 15:05:51 +0200
commit039a976745172ab2e5df3cf67ef3d635d66dbf72 (patch)
treeb42e45ffa3ce2876eae7b3617e36a2cab75f457f /src/libcharon
parent21cb6cffb1a5c42bb1b76ddffd4b036aa92d6fc5 (diff)
downloadstrongswan-039a976745172ab2e5df3cf67ef3d635d66dbf72.tar.bz2
strongswan-039a976745172ab2e5df3cf67ef3d635d66dbf72.tar.xz
Log messages with a loglevel > 1 to ANDROID_LOG_DEBUG.
Diffstat (limited to 'src/libcharon')
-rw-r--r--src/libcharon/plugins/android/android_logger.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libcharon/plugins/android/android_logger.c b/src/libcharon/plugins/android/android_logger.c
index fe4dbd227..f7624b2c7 100644
--- a/src/libcharon/plugins/android/android_logger.c
+++ b/src/libcharon/plugins/android/android_logger.c
@@ -47,6 +47,7 @@ METHOD(listener_t, log_, bool,
{
if (level <= this->level)
{
+ int prio = level > 1 ? ANDROID_LOG_DEBUG : ANDROID_LOG_INFO;
char sgroup[16], buffer[8192];
char *current = buffer, *next;
snprintf(sgroup, sizeof(sgroup), "%N", debug_names, group);
@@ -58,7 +59,7 @@ METHOD(listener_t, log_, bool,
{
*(next++) = '\0';
}
- __android_log_print(ANDROID_LOG_INFO, "charon", "%.2d[%s] %s\n",
+ __android_log_print(prio, "charon", "%.2d[%s] %s\n",
thread, sgroup, current);
current = next;
}