Skip to content

Commit 1f45d7f

Browse files
authored
feat: Change info logs to debug (#204)
1 parent abe4267 commit 1f45d7f

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/mcp/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export async function connectMCPClient(
1717
return await createMCPStreamableClient(url, token);
1818
} catch {
1919
// If streamable HTTP transport fails, fall back to SSE transport
20-
log.info('Streamable HTTP transport failed, falling back to SSE transport', {
20+
log.debug('Streamable HTTP transport failed, falling back to SSE transport', {
2121
url,
2222
});
2323
return await createMCPSSEClient(url, token);

src/mcp/server.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ export class ActorsMcpServer {
239239
const missingActors = defaults.actors.filter((name) => !this.tools.has(actorNameToToolName(name)));
240240
const tools = await getActorsAsTools(missingActors, apifyToken);
241241
if (tools.length > 0) {
242-
log.info('Loading default tools...');
242+
log.debug('Loading default tools...');
243243
this.upsertTools(tools);
244244
}
245245
}
@@ -262,7 +262,7 @@ export class ActorsMcpServer {
262262
public async loadToolsFromUrl(url: string, apifyToken: string) {
263263
const tools = await processParamsGetTools(url, apifyToken);
264264
if (tools.length > 0) {
265-
log.info('Loading tools from query parameters...');
265+
log.debug('Loading tools from query parameters...');
266266
this.upsertTools(tools, false);
267267
}
268268
}
@@ -320,7 +320,7 @@ export class ActorsMcpServer {
320320
private removeToolByName(toolName: string): boolean {
321321
if (this.tools.has(toolName)) {
322322
this.tools.delete(toolName);
323-
log.info(`Deleted tool: ${toolName}`);
323+
log.debug(`Deleted tool: ${toolName}`);
324324
return true;
325325
}
326326
return false;
@@ -429,7 +429,7 @@ export class ActorsMcpServer {
429429
if (name.startsWith('local__')) {
430430
// we split the name by '__' and take the last part, which is the actual Actor name
431431
const parts = name.split('__');
432-
log.info(`Tool name with prefix detected: ${name}, using last part: ${parts[parts.length - 1]}`);
432+
log.debug(`Tool name with prefix detected: ${name}, using last part: ${parts[parts.length - 1]}`);
433433
if (parts.length > 1) {
434434
name = parts[parts.length - 1];
435435
}
@@ -459,7 +459,7 @@ export class ActorsMcpServer {
459459
// Decode dot property names in arguments before validation,
460460
// since validation expects the original, non-encoded property names.
461461
args = decodeDotPropertyNames(args);
462-
log.info(`Validate arguments for tool: ${tool.tool.name} with arguments: ${JSON.stringify(args)}`);
462+
log.debug(`Validate arguments for tool: ${tool.tool.name} with arguments: ${JSON.stringify(args)}`);
463463
if (!tool.tool.ajvValidate(args)) {
464464
const msg = `Invalid arguments for tool ${tool.tool.name}: args: ${JSON.stringify(args)} error: ${JSON.stringify(tool?.tool.ajvValidate.errors)}`;
465465
log.error(msg);
@@ -510,7 +510,7 @@ export class ActorsMcpServer {
510510
const method = schema.shape.method.value;
511511
// Forward notifications from the proxy client to the server
512512
client.setNotificationHandler(schema, async (notification) => {
513-
log.info('Sending MCP notification', {
513+
log.debug('Sending MCP notification', {
514514
method,
515515
notification,
516516
});

src/tools/actor.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export async function callActorGetDataset(
6060
progressTracker?: ProgressTracker | null,
6161
): Promise<CallActorGetDatasetResult> {
6262
try {
63-
log.info(`Calling Actor ${actorName} with input: ${JSON.stringify(input)}`);
63+
log.debug(`Calling Actor ${actorName} with input: ${JSON.stringify(input)}`);
6464

6565
const client = new ApifyClient({ token: apifyToken });
6666
const actorClient = client.actor(actorName);
@@ -91,7 +91,7 @@ export async function callActorGetDataset(
9191
});
9292
}
9393

94-
log.info(`Actor ${actorName} finished with ${items.count} items`);
94+
log.debug(`Actor ${actorName} finished with ${items.count} items`);
9595
return { runId: actorRun.id, datasetId: completedRun.defaultDatasetId, items };
9696
} catch (error) {
9797
log.error(`Error calling actor: ${error}. Actor: ${actorName}, input: ${JSON.stringify(input)}`);
@@ -182,7 +182,7 @@ async function getMCPServersAsTools(
182182
actorInfo.actorDefinitionPruned.id, // Real ID of the Actor
183183
actorInfo.webServerMcpPath,
184184
);
185-
log.info('Retrieved MCP server URL for Actor', {
185+
log.debug('Retrieved MCP server URL for Actor', {
186186
actorFullName: actorInfo.actorDefinitionPruned.actorFullName,
187187
actorId,
188188
mcpServerUrl,

0 commit comments

Comments
 (0)