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:
@@ -385,7 +385,7 @@ export function installApiMethods(ClientClass: { prototype: GatewayClient }): vo
|
|||||||
}>(`/api/hands/${name}/activate`, params || {});
|
}>(`/api/hands/${name}/activate`, params || {});
|
||||||
return { runId: result.instance_id, status: result.status };
|
return { runId: result.instance_id, status: result.status };
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(`[GatewayClient] Hand trigger failed for ${name}:`, err);
|
logger.error(`Hand trigger failed for ${name}`, { error: err });
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ export function installHandMethods(ClientClass: { prototype: KernelClient }): vo
|
|||||||
return { approvals };
|
return { approvals };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
const { createLogger } = await import('./logger');
|
const { createLogger } = await import('./logger');
|
||||||
createLogger('KernelClient').error('listApprovals error:', error);
|
createLogger('KernelHands').error('listApprovals error:', error);
|
||||||
return { approvals: [] };
|
return { approvals: [] };
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user