Skip to content

Commit 98b0eff

Browse files
committed
Update log
1 parent 786caa6 commit 98b0eff

File tree

1 file changed

+4
-4
lines changed
  • joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/http

1 file changed

+4
-4
lines changed

joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/http/HttpWatcher.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
*/
1616
package com.jd.live.agent.governance.service.sync.http;
1717

18-
import com.jd.live.agent.governance.config.SyncConfig;
1918
import com.jd.live.agent.core.instance.Application;
2019
import com.jd.live.agent.core.parser.ObjectReader.StringReader;
2120
import com.jd.live.agent.core.util.Close;
2221
import com.jd.live.agent.core.util.Daemon;
2322
import com.jd.live.agent.core.util.Waiter;
2423
import com.jd.live.agent.core.util.http.HttpResponse;
2524
import com.jd.live.agent.core.util.http.HttpUtils;
25+
import com.jd.live.agent.governance.config.SyncConfig;
2626
import com.jd.live.agent.governance.service.sync.SyncKey.HttpSyncKey;
2727
import com.jd.live.agent.governance.service.sync.SyncResponse;
2828
import com.jd.live.agent.governance.service.sync.SyncStatus;
@@ -142,15 +142,15 @@ protected void request(HttpResource resource, HttpListener listener) {
142142
listener.onUpdate(new HttpWatchEvent(EventType.UPDATE, resource.getId(), response.getData()));
143143
break;
144144
case NOT_FOUND:
145-
listener.onUpdate(new HttpWatchEvent(resource.getId(), new IOException("Failed to request " + resource + ", caused by it's not found.")));
145+
listener.onUpdate(new HttpWatchEvent(resource.getId(), new IOException("Failed to request " + resource.getUrl() + ", caused by it's not found.")));
146146
case NOT_MODIFIED:
147147
break;
148148
default:
149-
listener.onUpdate(new HttpWatchEvent(resource.getId(), new IOException("Failed to request " + resource + ", caused by " + response.getMessage())));
149+
listener.onUpdate(new HttpWatchEvent(resource.getId(), new IOException("Failed to request " + resource.getUrl() + ", caused by " + response.getMessage())));
150150
break;
151151
}
152152
} catch (IOException e) {
153-
listener.onUpdate(new HttpWatchEvent(resource.getId(), e));
153+
listener.onUpdate(new HttpWatchEvent(resource.getId(), new IOException("Failed to request " + resource.getUrl() + ", caused by " + e.getMessage(), e)));
154154
}
155155
}
156156

0 commit comments

Comments
 (0)