From c8f007a6ce589b33e51502bbb14daa3eacd81491 Mon Sep 17 00:00:00 2001 From: Fabrizio Ferrigno Date: Mon, 21 Jul 2025 09:19:58 +0200 Subject: [PATCH] code review --- src/db/mysql-adapter.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/db/mysql-adapter.ts b/src/db/mysql-adapter.ts index dbc699d..77c2305 100644 --- a/src/db/mysql-adapter.ts +++ b/src/db/mysql-adapter.ts @@ -74,7 +74,7 @@ export class MysqlAdapter implements DbAdapter { } try { - console.error(`[INFO] Generating AWS auth token for region: ${this.awsRegion}, host: ${this.host}, user: ${this.config.user}`); + console.info(`[INFO] Generating AWS auth token for region: ${this.awsRegion}, host: ${this.host}, user: ${this.config.user}`); const signer = new Signer({ region: this.awsRegion, @@ -84,7 +84,7 @@ export class MysqlAdapter implements DbAdapter { }); const token = await signer.getAuthToken(); - console.error(`[INFO] AWS auth token generated successfully`); + console.info(`[INFO] AWS auth token generated successfully`); return token; } catch (err) { console.error(`[ERROR] Failed to generate AWS auth token: ${(err as Error).message}`); @@ -97,11 +97,11 @@ export class MysqlAdapter implements DbAdapter { */ async init(): Promise { try { - console.error(`[INFO] Connecting to MySQL: ${this.host}, Database: ${this.database}`); + console.info(`[INFO] Connecting to MySQL: ${this.host}, Database: ${this.database}`); // Handle AWS IAM authentication if (this.awsIamAuth) { - console.error(`[INFO] Using AWS IAM authentication for user: ${this.config.user}`); + console.info(`[INFO] Using AWS IAM authentication for user: ${this.config.user}`); try { const authToken = await this.generateAwsAuthToken(); @@ -121,7 +121,7 @@ export class MysqlAdapter implements DbAdapter { this.connection = await mysql.createConnection(this.config); } - console.error(`[INFO] MySQL connection established successfully`); + console.info(`[INFO] MySQL connection established successfully`); } catch (err) { console.error(`[ERROR] MySQL connection error: ${(err as Error).message}`); if (this.awsIamAuth) {