From 677ba31db20d214ffb83e0102a9b78d811b5bf68 Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Thu, 12 Jan 2017 15:32:26 -0800 Subject: [PATCH] libcutils: change klog_level to KLOG_INFO_LEVEL Some of Android componets e.g. init have migrated to use base/logging to get rid of klog utilities. However, without explicit initilization, the default klog_level is set to 3 which masks the logwrap output. This patch sets default klog_level to KLOG_INFO_LEVEL to make android_fork_execvp_ext log available. Bug: 34256270 Test: manual Change-Id: Ibe74707a92c954053cd0e6828a984fbd72b4acae --- include/cutils/klog.h | 2 -- libcutils/klog.cpp | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/include/cutils/klog.h b/include/cutils/klog.h index c837edb9a..e7cd30046 100644 --- a/include/cutils/klog.h +++ b/include/cutils/klog.h @@ -44,6 +44,4 @@ __END_DECLS #define KLOG_INFO(tag,x...) klog_write(KLOG_INFO_LEVEL, "<6>" tag ": " x) #define KLOG_DEBUG(tag,x...) klog_write(KLOG_DEBUG_LEVEL, "<7>" tag ": " x) -#define KLOG_DEFAULT_LEVEL 3 /* messages <= this level are logged */ - #endif diff --git a/libcutils/klog.cpp b/libcutils/klog.cpp index 4bad28a57..15adf6baf 100644 --- a/libcutils/klog.cpp +++ b/libcutils/klog.cpp @@ -27,7 +27,7 @@ #include #include -static int klog_level = KLOG_DEFAULT_LEVEL; +static int klog_level = KLOG_INFO_LEVEL; int klog_get_level(void) { return klog_level;