Code review comment: If we use `error` level, it will be prompted to the idea fatal error log and will be printed multiple times since we are retrying to connect.

Code before review:
void createConnection() {
try {
myConnectionState = ConnectionState.CONNECTING;
streamConnectionProvider = createConnectionProvider(project);
if (streamConnectionProvider == null) {
LOG.warn("Unable to establish the socket connection provider.");
return;
}
streamConnectionProvider.start();
Pair<InputStream, OutputStream> streams = new ImmutablePair<>(streamConnectionProvider.getInputStream(),
streamConnectionProvider.getOutputStream());
InputStream inputStream = streams.getKey();
OutputStream outputStream = streams.getValue();
if (inputStream == null || outputStream == null) {
LOG.warn("Unable to establish connection with the debug server.");
}
debugClient = new DAPClient();
Launcher<IDebugProtocolServer> clientLauncher = DSPLauncher.createClientLauncher(debugClient,
inputStream, outputStream);
debugServer = clientLauncher.getRemoteProxy();
launcherFuture = clientLauncher.startListening();
InitializeRequestArguments initParams = new InitializeRequestArguments();
initParams.setAdapterID("BallerinaDebugClient");
initializeFuture = debugServer.initialize(initParams).thenApply(res -> {
initializeResult = res;
LOG.info("Debug server initialize result received.");
debugClient.initialized();
requestManager = new DAPRequestManager(this, debugClient, debugServer, initializeResult);
debugClient.connect(requestManager);
myConnectionState = ConnectionState.CONNECTED;
return res;
});
} catch (IOException e) {
myConnectionState = ConnectionState.NOT_CONNECTED;
LOG.warn("Connecting to the DAP server failed.", e);
}
}

Line under review: LOG.warn("Connecting to the DAP server failed.", e);

Code after addressing the review:
void createConnection() {
try {
myConnectionState = ConnectionState.CONNECTING;
streamConnectionProvider = createConnectionProvider(project);
if (streamConnectionProvider == null) {
LOG.warn("Unable to establish the socket connection provider.");
return;
}
streamConnectionProvider.start();
Pair<InputStream, OutputStream> streams = new ImmutablePair<>(streamConnectionProvider.getInputStream(),
streamConnectionProvider.getOutputStream());
InputStream inputStream = streams.getKey();
OutputStream outputStream = streams.getValue();
if (inputStream == null || outputStream == null) {
LOG.warn("Unable to establish connection with the debug server.");
return;
}
debugClient = new DAPClient();
Launcher<IDebugProtocolServer> clientLauncher = DSPLauncher.createClientLauncher(debugClient,
inputStream, outputStream);
debugServer = clientLauncher.getRemoteProxy();
launcherFuture = clientLauncher.startListening();
InitializeRequestArguments initParams = new InitializeRequestArguments();
initParams.setAdapterID("BallerinaDebugClient");
initializeFuture = debugServer.initialize(initParams).thenApply(res -> {
initializeResult = res;
LOG.info("initialize response received from the debug server.");
debugClient.initialized();
requestManager = new DAPRequestManager(this, debugClient, debugServer, initializeResult);
debugClient.connect(requestManager);
myConnectionState = ConnectionState.CONNECTED;
return res;
});
} catch (IOException e) {
myConnectionState = ConnectionState.NOT_CONNECTED;
LOG.warn("Error occurred when trying to initialize connection with the debug server.", e);
}
}