From 7b15c1e519884dbc7c762158c509f4c5188fc973 Mon Sep 17 00:00:00 2001 From: Mykola Morhun Date: Mon, 26 Jun 2017 17:41:00 +0300 Subject: [PATCH] CODENVY-2284: Add additional logs if start from snapshot fail (#5465) --- .../environment/server/CheEnvironmentEngine.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/environment/server/CheEnvironmentEngine.java b/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/environment/server/CheEnvironmentEngine.java index c78b30f5615..c37607c4ac9 100644 --- a/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/environment/server/CheEnvironmentEngine.java +++ b/wsmaster/che-core-api-workspace/src/main/java/org/eclipse/che/api/environment/server/CheEnvironmentEngine.java @@ -940,8 +940,11 @@ private Instance startInstance(boolean recover, } } catch (NotFoundException e) { try { - machineLogger.writeLine("Failed to boot machine from snapshot: snapshot not found. " + - "Machine will be created from origin source."); + machineLogger.writeLine( + format("Failed to boot machine %s of workspace %s, because snapshot not found. " + + "The machine will be created from origin source.", + machine.getConfig().getName(), + machine.getWorkspaceId())); } catch (IOException ignore) { } } } @@ -949,8 +952,10 @@ private Instance startInstance(boolean recover, instance = machineStarter.startMachine(machineLogger, machineSource); } catch (SourceNotFoundException e) { if (recover) { - LOG.error("Image of snapshot for machine " + machine.getConfig().getName() + - " not found. " + "Machine will be created from origin source."); + LOG.error(format("The snapshot of the image for the machine %s of the workspace %s not found. " + + "The machine will be created from origin source.", + machine.getConfig().getName(), + machine.getWorkspaceId())); machine = originMachine; instance = machineStarter.startMachine(machineLogger, null); } else {