You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ky...@apache.org on 2018/11/28 09:22:54 UTC

[incubator-weex] branch master updated: Do not print log if msg is null (#1838)

This is an automated email from the ASF dual-hosted git repository.

kyork pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git


The following commit(s) were added to refs/heads/master by this push:
     new dcc7ba6  Do not print log if msg is null (#1838)
dcc7ba6 is described below

commit dcc7ba6cb0724e157a120220d21f292774a637b7
Author: darin <dy...@qq.com>
AuthorDate: Wed Nov 28 17:22:50 2018 +0800

    Do not print log if msg is null (#1838)
---
 android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java b/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java
index af42be3..e75726b 100644
--- a/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java
+++ b/android/sdk/src/main/java/com/taobao/weex/utils/WXLogUtils.java
@@ -72,7 +72,10 @@ public class WXLogUtils {
   }
 
   private static void log(String tag, String msg, LogLevel level){
-    if(msg != null && tag != null && sLogWatcher !=null){
+    if(msg == null || tag == null || level == null)
+      return;
+
+    if(sLogWatcher !=null){
       sLogWatcher.onLog(level.getName(), tag, msg);
     }