Commit e5e45042 authored by Quxl's avatar Quxl

x

parent c7202cb3
......@@ -19,6 +19,8 @@ import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import io.netty.util.internal.ThrowableUtil;
@Component
public class AliyunLogProducer {
......@@ -75,11 +77,12 @@ public class AliyunLogProducer {
}
@Override
public void onFailure(Throwable errors) {
if (errors instanceof ResultFailedException) {
Result result = ((ResultFailedException) errors).getResult();
public void onFailure(Throwable e) {
if (e instanceof ResultFailedException) {
Result result = ((ResultFailedException) e).getResult();
LOGGER.error("Failed to send logs, project={}, logStore={}, result={}, log={}", project, logStore, result, logText);
} else {
String errors = ThrowableUtil.stackTraceToString(e);
LOGGER.error("Failed to send logs, project={}, logStore={}, errors={}, log={}", project, logStore, errors, logText);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment