Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
Change some error level log to debug level (#2877)
Browse files Browse the repository at this point in the history
  • Loading branch information
Darin726 authored and lucky-chen committed Sep 4, 2019
1 parent 2a3f3d0 commit 23821f9
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 29 deletions.
6 changes: 3 additions & 3 deletions android/sdk/src/main/java/com/taobao/weex/WXEnvironment.java
Original file line number Diff line number Diff line change
Expand Up @@ -605,13 +605,13 @@ public static String getLibJScRealPath() {

public static String getLibJssRealPath() {
if (WXEnvironment.sUseRunTimeApi && !TextUtils.isEmpty(CORE_JSS_RUNTIME_SO_PATH)){
WXLogUtils.e("test-> findLibJssRuntimeRealPath " + CORE_JSS_RUNTIME_SO_PATH);
WXLogUtils.d("test-> findLibJssRuntimeRealPath " + CORE_JSS_RUNTIME_SO_PATH);
return CORE_JSS_RUNTIME_SO_PATH;
}

if(TextUtils.isEmpty(CORE_JSS_SO_PATH)) {
CORE_JSS_SO_PATH = findSoPath(CORE_JSS_SO_NAME);
WXLogUtils.e("test-> findLibJssRealPath " + CORE_JSS_SO_PATH);
WXLogUtils.d("test-> findLibJssRealPath " + CORE_JSS_SO_PATH);
}

return CORE_JSS_SO_PATH;
Expand Down Expand Up @@ -652,7 +652,7 @@ public static String getLibLdPath() {
}
}

WXLogUtils.e("getLibLdPath is " + LIB_LD_PATH);
WXLogUtils.d("getLibLdPath is " + LIB_LD_PATH);
return LIB_LD_PATH;
}

Expand Down
6 changes: 3 additions & 3 deletions android/sdk/src/main/java/com/taobao/weex/WXHttpListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,10 @@ public void onHttpFinish(WXResponse response) {

if (isPreDownLoadMode){
if (isInstanceReady){
WXLogUtils.e("test->", "DownLoad didHttpFinish on http" );
WXLogUtils.d("test->", "DownLoad didHttpFinish on http" );
didHttpFinish(response);
}else {
WXLogUtils.e("test->", "DownLoad end before activity created" );
WXLogUtils.d("test->", "DownLoad end before activity created" );
mResponse = response;
isResponseHasWait = true;
}
Expand All @@ -238,7 +238,7 @@ public void onInstanceReady(){
}
this.isInstanceReady = true;
if (isResponseHasWait){
WXLogUtils.e("test->", "preDownLoad didHttpFinish on ready" );
WXLogUtils.d("test->", "preDownLoad didHttpFinish on ready" );
this.didHttpFinish(mResponse);
}

Expand Down
2 changes: 1 addition & 1 deletion android/sdk/src/main/java/com/taobao/weex/WXSDKEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public static void initialize(Application application,InitConfig config){
long start = System.currentTimeMillis();
WXEnvironment.sSDKInitStart = start;
if(WXEnvironment.isApkDebugable(application)){
WXEnvironment.sLogLevel = LogLevel.INFO;
WXEnvironment.sLogLevel = LogLevel.DEBUG;
}else{
WXEnvironment.sLogLevel = LogLevel.WARN;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ public boolean isPreDownLoad(){
}

public void onInstanceReady(){
WXLogUtils.e("test->","onInstanceReady");
WXLogUtils.d("test->","onInstanceReady");
mApmForInstance.onStage(WXInstanceApm.KEY_PAGE_STAGES_CONTAINER_READY);
if (!isPreInit && !isPreDownLoad){
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ public void reportNativeInitStatus(String statusCode, String errorMsg) {
params.put(IWXUserTrackAdapter.MONITOR_ERROR_CODE, statusCode);
params.put(IWXUserTrackAdapter.MONITOR_ARG, "InitFrameworkNativeError");
params.put(IWXUserTrackAdapter.MONITOR_ERROR_MSG, errorMsg);
Log.e("Dyy", "reportNativeInitStatus is running and errorCode is " + statusCode + " And errorMsg is " + errorMsg);
WXLogUtils.e("reportNativeInitStatus is running and errorCode is " + statusCode + " And errorMsg is " + errorMsg);
userTrackAdapter.commit(null, null, IWXUserTrackAdapter.INIT_FRAMEWORK, null, params);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,13 +418,13 @@ private void printLog(){
Long interaction = stageMap.get(KEY_PAGE_STAGES_INTERACTION);
Long containerReady = stageMap.get(KEY_PAGE_STAGES_CONTAINER_READY);
if (null != endDownLoad && null != startDownLoad){
WXLogUtils.e("test->", "downLoadTime: "+ (endDownLoad - startDownLoad));
WXLogUtils.d("test->", "downLoadTime: "+ (endDownLoad - startDownLoad));
}
if (null != endDownLoad && null != interaction){
WXLogUtils.e("test->", "renderTime: "+ (interaction - endDownLoad));
WXLogUtils.d("test->", "renderTime: "+ (interaction - endDownLoad));
}
if (null != containerReady && null !=interaction){
WXLogUtils.e("test->", "showTime: "+ (interaction - containerReady));
WXLogUtils.d("test->", "showTime: "+ (interaction - containerReady));
}

}
Expand Down
2 changes: 1 addition & 1 deletion weex_core/Source/android/bridge/multi_so_initializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ bool MultiSoInitializer::Init(
soPath = SoUtils::FindLibJssSoPath();
}

LOGE("final executablePath:%s", soPath.c_str());
LOGD("final executablePath:%s", soPath.c_str());
SoUtils::updateSoLinkPath(SoUtils::lib_ld_path());
void *handle = dlopen(soPath.c_str(), RTLD_NOW);
if (!handle) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1001,14 +1001,14 @@ ScriptBridgeInMultiProcess::ScriptBridgeInMultiProcess() {
std::unique_ptr<MultiProcessAndSoInitializer> initializer(
new MultiProcessAndSoInitializer);

LOGE("ScriptBridgeInMultiProcess");
LOGD("ScriptBridgeInMultiProcess");
bool passable = initializer->Init(
[this](IPCHandler *handler) { RegisterIPCCallback(handler); },
[this](std::unique_ptr<WeexJSConnection> connection) {
static_cast<bridge::script::ScriptSideInMultiProcess *>(script_side())
->set_sender(connection->sender());
connection_ = std::move(connection);
LOGE("ScriptBridgeInMultiProcess finish");
LOGD("ScriptBridgeInMultiProcess finish");
return true;
},
[this](const char *page_id, const char *func,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ int ScriptSideInQueue::InitFramework(

if(WeexEnv::getEnv()->can_m_cache_task_()) {
WeexEnv::getEnv()->m_task_cache_.push_back(new InitFrameworkTask(String::fromUTF8(script), params));
LOGE("cache initFramework %d", WeexEnv::getEnv()->m_task_cache_.size());
LOGD("cache initFramework %d", WeexEnv::getEnv()->m_task_cache_.size());
} else {
weexTaskQueue_bk_ = new WeexTaskQueue(weexTaskQueue_->isMultiProgress);
weexTaskQueue_bk_->addTask(new InitFrameworkTask(String::fromUTF8(script), params));
Expand Down Expand Up @@ -136,7 +136,7 @@ int ScriptSideInQueue::ExecJsService(const char *source) {
ExeJsServicesTask *task = new ExeJsServicesTask(String::fromUTF8(source));
if(WeexEnv::getEnv()->can_m_cache_task_() && weexTaskQueue_bk_ == nullptr){
WeexEnv::getEnv()->m_task_cache_.push_back(task);
LOGE("cache ExecJsService %d", WeexEnv::getEnv()->m_task_cache_.size());
LOGD("cache ExecJsService %d", WeexEnv::getEnv()->m_task_cache_.size());
} else {
weexTaskQueue_bk_->addTask(task);
}
Expand Down Expand Up @@ -171,7 +171,7 @@ int ScriptSideInQueue::ExecJS(const char *instanceId, const char *nameSpace,
if (WeexEnv::getEnv()->enableBackupThread()) {
if(WeexEnv::getEnv()->can_m_cache_task_() && weexTaskQueue_bk_ == nullptr){
WeexEnv::getEnv()->m_task_cache_.push_back(task->clone());
LOGE("cache ExecJS %d", WeexEnv::getEnv()->m_task_cache_.size());
LOGD("cache ExecJS %d", WeexEnv::getEnv()->m_task_cache_.size());
} else {
weexTaskQueue_bk_->addTask(task->clone());
}
Expand Down Expand Up @@ -278,7 +278,7 @@ std::unique_ptr<WeexJSResult> ScriptSideInQueue::ExecJSOnInstance(const char *in
//don't need wait. just run js.
std::unique_ptr<WeexJSResult> returnResult;
returnResult.reset(new WeexJSResult());
LOGE("test-> return default result");
LOGD("test-> return default result");
return returnResult;
}
auto future = std::unique_ptr<WeexTask::Future>(new WeexTask::Future());
Expand Down
4 changes: 2 additions & 2 deletions weex_core/Source/android/jsengine/task/timer_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ void TimerQueue::init() {
void TimerQueue::start() {
while (true) {
auto pTask = getTask();
LOGE("getTask return task");
LOGD("getTask return task");

if(pTask->global_object_ != nullptr && weexTaskQueue->weexRuntime->hasInstanceId(pTask->instanceID)) {
weexTaskQueue->addTimerTask(pTask->instanceID, pTask->m_function, pTask->taskId,pTask->global_object_, !pTask->repeat);
if (pTask->repeat && pTask->global_object_ != nullptr && weexTaskQueue->weexRuntime->hasInstanceId(pTask->instanceID)) {
LOGE("repreat");
LOGD("repreat");
addTimerTask(new TimerTask(pTask));
}
}
Expand Down
4 changes: 2 additions & 2 deletions weex_core/Source/android/jsengine/weex_runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ void WeexRuntime::exeJSWithCallback(const String &instanceId, const String &name
}

std::unique_ptr<WeexJSResult> WeexRuntime::exeJSOnInstance(const String &instanceId, const String &script) {
LOGE("test-> [runtime] beofore exeJSOnInstance");
LOGD("test-> [runtime] beofore exeJSOnInstance");
std::unique_ptr<WeexJSResult> returnResult;
returnResult.reset(new WeexJSResult);

Expand Down Expand Up @@ -526,7 +526,7 @@ std::unique_ptr<WeexJSResult> WeexRuntime::exeJSOnInstance(const String &instanc
char *buf = new char[returnResult->length + 1];
strcpy(buf, data);
returnResult->data.reset(buf);
LOGE("test-> [runtime] end exeJSOnInstance");
LOGD("test-> [runtime] end exeJSOnInstance");
return returnResult;
}

Expand Down
8 changes: 4 additions & 4 deletions weex_core/Source/android/multiprocess/weex_js_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,11 +334,11 @@ static void findIcuDataPath(std::string &icuDataPath) {
fseek(f,0L,SEEK_END);
int size=ftell(f);

LOGE("file size is %d",size);
LOGD("file size is %d",size);
struct stat statbuf;
stat("/proc/self/maps",&statbuf);
int size1=statbuf.st_size;
LOGE("file size1 is %d",size1);
LOGD("file size1 is %d",size1);
char buffer[256];
char *line;
while ((line = fgets(buffer, 256, f))) {
Expand Down Expand Up @@ -401,7 +401,7 @@ void doExec(int fdClient, int fdServer, bool traceEnable, bool startupPie) {
std::string executablePath;
std::string icuDataPath;
if(SoUtils::jss_icu_path() != nullptr) {
LOGE("jss_icu_path not null %s",SoUtils::jss_icu_path());
LOGD("jss_icu_path not null %s",SoUtils::jss_icu_path());
icuDataPath = SoUtils::jss_icu_path();
} else {
s_in_find_icu = true;
Expand Down Expand Up @@ -529,7 +529,7 @@ void doExec(int fdClient, int fdServer, bool traceEnable, bool startupPie) {
const char *argv[] = {executableName.c_str(), fdStr, fdServerStr, traceEnable ? "1" : "0", g_crashFileName.c_str(), nullptr};
if (-1 == execve(argv[0], const_cast<char *const *>(&argv[0]),
const_cast<char *const *>(envp.get()))) {
LOGE("bbbbbbbbbbbb execve failed errno %s \n", strerror(errno));
LOGE("execve failed errno %s \n", strerror(errno));
#if PRINT_LOG_CACHEFILE
mcfile << "execve failed:" << strerror(errno) << std::endl;
#endif
Expand Down
4 changes: 2 additions & 2 deletions weex_core/Source/android/utils/params_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ std::vector<INIT_FRAMEWORK_PARAMS*> initFromParam(
if (j_get_jsb_so_path != nullptr) {
SoUtils::set_jsb_so_path(const_cast<char*>(
env->GetStringUTFChars((jstring)(j_get_jsb_so_path), nullptr)));
LOGE("g_jsbSoPath is %s ", SoUtils::jsb_so_path());
LOGD("g_jsbSoPath is %s ", SoUtils::jsb_so_path());
env->DeleteLocalRef(j_get_jsb_so_path);
}
}
Expand All @@ -294,7 +294,7 @@ std::vector<INIT_FRAMEWORK_PARAMS*> initFromParam(
if (j_get_lib_ld_path != nullptr) {
SoUtils::set_lib_ld_path(const_cast<char*>(
env->GetStringUTFChars((jstring)(j_get_lib_ld_path), nullptr)));
LOGE("lib_ld_path is %s ", SoUtils::lib_ld_path());
LOGD("lib_ld_path is %s ", SoUtils::lib_ld_path());
env->DeleteLocalRef(j_get_lib_ld_path);
}
}
Expand Down

0 comments on commit 23821f9

Please sign in to comment.