Skip to content

Commit 01f4ded

Browse files
committed
chore: add more logging to server starting
1 parent 1f50067 commit 01f4ded

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/src/main/java/com/diffplug/spotless/npm/NpmFormatterStepStateBase.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import org.slf4j.LoggerFactory;
3434

3535
import com.diffplug.spotless.FormatterFunc;
36+
import com.diffplug.spotless.ProcessRunner;
3637
import com.diffplug.spotless.ProcessRunner.LongRunningProcess;
3738
import com.diffplug.spotless.ThrowingEx;
3839

@@ -129,10 +130,12 @@ protected ServerProcessInfo npmRunServer() throws ServerStartException, IOExcept
129130
try {
130131
if (server.isAlive()) {
131132
server.destroyForcibly();
132-
server.waitFor();
133+
ProcessRunner.Result result = server.result();
134+
logger.info("Launching npm server process failed. Process result:\n{}", result);
133135
}
134136
} catch (Throwable t) {
135-
// ignore
137+
ProcessRunner.Result result = server != null ? ThrowingEx.get(server::result) : null;
138+
logger.debug("Unable to forcibly end the server process. Process result:\n{}", result, t);
136139
}
137140
throw timeoutException;
138141
}

0 commit comments

Comments
 (0)