mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
try to avoid use multiline exception directly
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
package com.alibaba.otter.canal.example;
|
||||
|
||||
import org.apache.commons.lang.exception.ExceptionUtils;
|
||||
|
||||
import com.alibaba.otter.canal.client.CanalConnector;
|
||||
import com.alibaba.otter.canal.client.CanalConnectors;
|
||||
|
||||
@@ -41,7 +39,7 @@ public class ClusterCanalClientTest extends AbstractCanalClientTest {
|
||||
logger.info("## stop the canal client");
|
||||
clientTest.stop();
|
||||
} catch (Throwable e) {
|
||||
logger.warn("##something goes wrong when stopping canal:\n{}", ExceptionUtils.getFullStackTrace(e));
|
||||
logger.warn("##something goes wrong when stopping canal:", e);
|
||||
} finally {
|
||||
logger.info("## canal client is down.");
|
||||
}
|
||||
|
||||
@@ -2,8 +2,6 @@ package com.alibaba.otter.canal.example;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
|
||||
import org.apache.commons.lang.exception.ExceptionUtils;
|
||||
|
||||
import com.alibaba.otter.canal.client.CanalConnector;
|
||||
import com.alibaba.otter.canal.client.CanalConnectors;
|
||||
import com.alibaba.otter.canal.common.utils.AddressUtils;
|
||||
@@ -39,7 +37,7 @@ public class SimpleCanalClientTest extends AbstractCanalClientTest {
|
||||
logger.info("## stop the canal client");
|
||||
clientTest.stop();
|
||||
} catch (Throwable e) {
|
||||
logger.warn("##something goes wrong when stopping canal:\n{}", ExceptionUtils.getFullStackTrace(e));
|
||||
logger.warn("##something goes wrong when stopping canal:", e);
|
||||
} finally {
|
||||
logger.info("## canal client is down.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user