fix: unify logger names in kernel-hands, replace console.error in gateway-api

- Fix inconsistent 'KernelClient' logger name to 'KernelHands' in listApprovals
- Replace console.error with logger.error in gateway-api triggerHand
- No functional changes, only logging consistency improvements
This commit is contained in:
iven
2026-03-31 16:29:39 +08:00
parent 721451f6a7
commit 7d4d2b999b
2 changed files with 2 additions and 2 deletions

View File

@@ -385,7 +385,7 @@ export function installApiMethods(ClientClass: { prototype: GatewayClient }): vo
}>(`/api/hands/${name}/activate`, params || {});
return { runId: result.instance_id, status: result.status };
} catch (err) {
console.error(`[GatewayClient] Hand trigger failed for ${name}:`, err);
logger.error(`Hand trigger failed for ${name}`, { error: err });
throw err;
}
};

View File

@@ -163,7 +163,7 @@ export function installHandMethods(ClientClass: { prototype: KernelClient }): vo
return { approvals };
} catch (error) {
const { createLogger } = await import('./logger');
createLogger('KernelClient').error('listApprovals error:', error);
createLogger('KernelHands').error('listApprovals error:', error);
return { approvals: [] };
}
};