Skip to content

Commit 49505a3

Browse files
committed
add more logging
1 parent 1d3d182 commit 49505a3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

PluginsAndFeatures/azure-toolkit-for-eclipse/com.microsoft.azuretools.azuremcp/src/com/microsoft/azuretools/azuremcp/GithubCopilotAzureMcpInitializer.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,40 @@
33
import java.io.File;
44
import java.util.concurrent.CompletableFuture;
55

6+
import org.eclipse.core.runtime.ILog;
7+
68
import com.microsoft.copilot.eclipse.ui.extensions.IMcpRegistrationProvider;
79

810
public class GithubCopilotAzureMcpInitializer implements IMcpRegistrationProvider {
911

12+
private static final ILog log = ILog.of(GithubCopilotAzureMcpInitializer.class);
13+
private static final String PLUGIN_ID = "com.microsoft.azuretools.azuremcp";
14+
1015
private AzureMcpPackageManager azureMcpPackageManager;
1116
private static final String MCP_CONFIG_TEMPLATE = "{ \"servers\": { \"azuremcp\": { \"command\": \"%s\", \"args\": [server, start], \"description\": \"Azure MCP Server\" } } }";
1217

1318
public GithubCopilotAzureMcpInitializer() {
1419
this.azureMcpPackageManager = new AzureMcpPackageManager();
20+
log.error("Azure MCP Initializer created");
1521
}
1622

1723
@Override
1824
public CompletableFuture<String> getMcpServerConfigurations() {
25+
log.error("getMcpServerConfigurations invoked");
1926
return CompletableFuture.supplyAsync(() -> getAzureMcpConfig());
2027
}
2128

2229
private String getAzureMcpConfig() {
2330
File azureMcpExe = azureMcpPackageManager.getAzureMcpExecutable();
2431

2532
if(azureMcpExe != null) {
33+
log.info("Azure MCP executable available");
34+
2635
String mcpConfig = String.format(MCP_CONFIG_TEMPLATE, azureMcpExe.getAbsolutePath().replace("\\", "\\\\"));
2736
azureMcpPackageManager.cleanup();
2837
return mcpConfig;
2938
} else {
39+
log.error("Azure MCP executable not available");
3040
return null;
3141
}
3242
}

0 commit comments

Comments
 (0)