From 4a497d3cdd70ea8b453f539a5aa53d7b572c211a Mon Sep 17 00:00:00 2001 From: Mikhail Shabarov Date: Thu, 5 Aug 2021 16:53:24 +0300 Subject: [PATCH] Add temporary logging --- .../java/com/vaadin/flow/server/frontend/FrontendTools.java | 1 + .../vaadin/flow/server/frontend/TaskRunPnpmInstallTest.java | 3 +++ .../src/main/java/com/vaadin/flow/testutil/FrontendStubs.java | 3 +++ 3 files changed, 7 insertions(+) diff --git a/flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendTools.java b/flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendTools.java index 76d10851ef4..4df93ac4e39 100644 --- a/flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendTools.java +++ b/flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendTools.java @@ -520,6 +520,7 @@ File getNpmCacheDir() throws IllegalStateException { npmCacheCommand.add("get"); npmCacheCommand.add("cache"); npmCacheCommand.add("--global"); + getLogger().info("Commands = " + npmCacheCommand); String output = FrontendUtils.executeCommand(npmCacheCommand); getLogger().info("Command execution output: " + output); output = parseCommandOutput(output); diff --git a/flow-server/src/test/java/com/vaadin/flow/server/frontend/TaskRunPnpmInstallTest.java b/flow-server/src/test/java/com/vaadin/flow/server/frontend/TaskRunPnpmInstallTest.java index 93aa7ad4562..dfb13b5d654 100644 --- a/flow-server/src/test/java/com/vaadin/flow/server/frontend/TaskRunPnpmInstallTest.java +++ b/flow-server/src/test/java/com/vaadin/flow/server/frontend/TaskRunPnpmInstallTest.java @@ -27,6 +27,7 @@ import org.junit.Before; import org.junit.Test; import org.mockito.Mockito; +import org.slf4j.LoggerFactory; import com.vaadin.flow.server.Constants; import com.vaadin.flow.server.ExecutionFailedException; @@ -617,6 +618,8 @@ public void runPnpmInstall_checkNpmAcceptsWhitespaces_throwsOnWindows() // given File npmCacheFolder = temporaryFolder.newFolder("Foo Bar"); + LoggerFactory.getLogger(TaskRunPnpmInstallTest.class).info( + "Npm cache folder = " + npmCacheFolder.getAbsolutePath()); FrontendStubs.ToolStubInfo nodeStub = FrontendStubs.ToolStubInfo.none(); FrontendStubs.ToolStubInfo npmStub = FrontendStubs.ToolStubInfo .builder(FrontendStubs.Tool.NPM).withVersion("6.0.0") diff --git a/flow-test-generic/src/main/java/com/vaadin/flow/testutil/FrontendStubs.java b/flow-test-generic/src/main/java/com/vaadin/flow/testutil/FrontendStubs.java index a1f4d45186e..cfb9888f9d7 100644 --- a/flow-test-generic/src/main/java/com/vaadin/flow/testutil/FrontendStubs.java +++ b/flow-test-generic/src/main/java/com/vaadin/flow/testutil/FrontendStubs.java @@ -21,6 +21,7 @@ import java.util.Objects; import org.apache.commons.io.FileUtils; +import org.slf4j.LoggerFactory; /** * Utility class for stubbing Node.JS and Webpack scripts. @@ -348,6 +349,8 @@ private String generateNpmScript(StringBuilder scriptBuilder) { .append(cacheDir).append("');\n"); } script = scriptBuilder.toString(); + + LoggerFactory.getLogger(FrontendStubs.class).info("Script = " + script); return script; } }