@@ -5,6 +5,7 @@ import { ToolArgs, OperationType } from "../../tool.js";
5
5
import { generateSecurePassword } from "../../../common/atlas/generatePassword.js" ;
6
6
import logger , { LogId } from "../../../logger.js" ;
7
7
import { inspectCluster } from "../../../common/atlas/cluster.js" ;
8
+ import { error } from "console" ;
8
9
9
10
const EXPIRY_MS = 1000 * 60 * 60 * 12 ; // 12 hours
10
11
@@ -115,6 +116,12 @@ export class ConnectClusterTool extends AtlasToolBase {
115
116
private async connectToCluster ( connectionString : string ) : Promise < void > {
116
117
let lastError : Error | undefined = undefined ;
117
118
119
+ logger . debug (
120
+ LogId . atlasConnectAttempt ,
121
+ "atlas-connect-cluster" ,
122
+ `attempting to connect to cluster: ${ this . session . connectedAtlasCluster ?. clusterName } `
123
+ ) ;
124
+
118
125
for ( let i = 0 ; i < 600 ; i ++ ) {
119
126
// try for 5 minutes
120
127
try {
@@ -158,6 +165,12 @@ export class ConnectClusterTool extends AtlasToolBase {
158
165
this . session . connectedAtlasCluster = undefined ;
159
166
throw lastError ;
160
167
}
168
+
169
+ logger . debug (
170
+ LogId . atlasConnectSuccessed ,
171
+ "atlas-connect-cluster" ,
172
+ `connected to cluster: ${ this . session . connectedAtlasCluster ?. clusterName } `
173
+ ) ;
161
174
}
162
175
163
176
protected async execute ( { projectId, clusterName } : ToolArgs < typeof this . argsShape > ) : Promise < CallToolResult > {
0 commit comments