]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Log messages with a loglevel > 1 to ANDROID_LOG_DEBUG.
authorTobias Brunner <tobias@strongswan.org>
Tue, 18 Oct 2011 13:05:51 +0000 (15:05 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 18 Oct 2011 13:05:51 +0000 (15:05 +0200)
src/libcharon/plugins/android/android_logger.c

index fe4dbd2272e2dd1ce9cd56522fef46f61d2a27b7..f7624b2c7a27c549e542bec7d0aa4e27970227ab 100644 (file)
@@ -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;
                }