diff --git a/.travis.yml b/.travis.yml
index 32306778b30..e3f3350628c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,3 +16,6 @@ script:
after_success:
- bash <(curl -s https://codecov.io/bash)
+
+after_failure:
+ - if [ -f dubbo.log ]; then echo "------TAIL of dubbo.log------"; tail -n 1000 dubbo.log; echo "------END of dubbo.log------"; fi
diff --git a/dubbo-cluster/src/test/resources/log4j.xml b/dubbo-cluster/src/test/resources/log4j.xml
index df9d68a0fab..eb0c9f105de 100644
--- a/dubbo-cluster/src/test/resources/log4j.xml
+++ b/dubbo-cluster/src/test/resources/log4j.xml
@@ -18,6 +18,7 @@
+
diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/DubboAppender.java b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/DubboAppender.java
index da3968e9f6e..e2b1940a7e4 100644
--- a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/DubboAppender.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/DubboAppender.java
@@ -16,17 +16,24 @@
*/
package org.apache.dubbo.common.utils;
-import org.apache.log4j.ConsoleAppender;
+import org.apache.log4j.FileAppender;
import org.apache.log4j.spi.LoggingEvent;
import java.util.ArrayList;
import java.util.List;
-public class DubboAppender extends ConsoleAppender {
+public class DubboAppender extends FileAppender {
+
+ private static final String DEFAULT_FILE_NAME = "dubbo.log";
+
+ public DubboAppender() {
+ super();
+ setFile(DEFAULT_FILE_NAME);
+ }
public static boolean available = false;
- public static List logList = new ArrayList();
+ public static List logList = new ArrayList<>();
public static void doStart() {
available = true;
diff --git a/dubbo-common/src/test/resources/log4j.xml b/dubbo-common/src/test/resources/log4j.xml
index f5da181b5e3..260e5c9d85f 100644
--- a/dubbo-common/src/test/resources/log4j.xml
+++ b/dubbo-common/src/test/resources/log4j.xml
@@ -20,6 +20,7 @@
+
diff --git a/dubbo-registry/dubbo-registry-default/src/test/resources/log4j.xml b/dubbo-registry/dubbo-registry-default/src/test/resources/log4j.xml
index c8d6d8c5b58..91905fd10b2 100644
--- a/dubbo-registry/dubbo-registry-default/src/test/resources/log4j.xml
+++ b/dubbo-registry/dubbo-registry-default/src/test/resources/log4j.xml
@@ -21,6 +21,7 @@
+
@@ -30,14 +31,8 @@
-->
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dubbo-remoting/dubbo-remoting-netty/src/test/resources/log4j.xml b/dubbo-remoting/dubbo-remoting-netty/src/test/resources/log4j.xml
index acb85098b27..fc40926e12a 100644
--- a/dubbo-remoting/dubbo-remoting-netty/src/test/resources/log4j.xml
+++ b/dubbo-remoting/dubbo-remoting-netty/src/test/resources/log4j.xml
@@ -21,6 +21,7 @@
+
diff --git a/dubbo-rpc/dubbo-rpc-api/src/test/resources/log4j.xml b/dubbo-rpc/dubbo-rpc-api/src/test/resources/log4j.xml
index f041044f081..e0eda90175d 100644
--- a/dubbo-rpc/dubbo-rpc-api/src/test/resources/log4j.xml
+++ b/dubbo-rpc/dubbo-rpc-api/src/test/resources/log4j.xml
@@ -21,6 +21,7 @@
+
diff --git a/dubbo-rpc/dubbo-rpc-dubbo/src/test/resources/log4j.xml b/dubbo-rpc/dubbo-rpc-dubbo/src/test/resources/log4j.xml
index 3c5d2ba218e..09dba05e6cc 100644
--- a/dubbo-rpc/dubbo-rpc-dubbo/src/test/resources/log4j.xml
+++ b/dubbo-rpc/dubbo-rpc-dubbo/src/test/resources/log4j.xml
@@ -21,6 +21,7 @@
+
@@ -30,17 +31,8 @@
-->
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
diff --git a/dubbo-serialization/dubbo-serialization-test/src/test/resources/log4j.xml b/dubbo-serialization/dubbo-serialization-test/src/test/resources/log4j.xml
index f71c5535c14..3c5e376bebd 100644
--- a/dubbo-serialization/dubbo-serialization-test/src/test/resources/log4j.xml
+++ b/dubbo-serialization/dubbo-serialization-test/src/test/resources/log4j.xml
@@ -18,6 +18,7 @@
+