Skip to content

Commit c7c1ee8

Browse files
authored
CODENVY-2285: Add registry host in log on snapshot deletion failure (eclipse-che#5500)
1 parent ee1eae8 commit c7c1ee8

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

plugins/plugin-docker/che-plugin-docker-machine/src/main/java/org/eclipse/che/plugin/docker/machine/DockerInstanceProvider.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,11 @@ private void removeSnapshotFromRegistry(final DockerMachineSource dockerMachineS
200200
conn.disconnect();
201201
}
202202
} catch (IOException e) {
203-
LOG.error(e.getLocalizedMessage(), e);
203+
LOG.error("Failed to remove {} snapshot from {}. Cause: {}",
204+
dockerMachineSource.getRepository(),
205+
dockerMachineSource.getRegistry(),
206+
e.getLocalizedMessage(),
207+
e);
204208
}
205209
}
206210

@@ -239,7 +243,11 @@ private void removeSnapshotFromDockerHub(String repository) throws SnapshotExcep
239243
conn.disconnect();
240244
}
241245
} catch (IOException e) {
242-
LOG.error(e.getLocalizedMessage(), e);
246+
LOG.error("Failed to remove {} snapshot from {}. Cause: {}",
247+
repository,
248+
DOCKER_HUB_BASE_URI,
249+
e.getLocalizedMessage(),
250+
e);
243251
}
244252
}
245253

0 commit comments

Comments
 (0)