feat: add logging for InfluxDB client initialization and PostgreSQL client acquisition

This commit is contained in:
Giuseppe Raffa
2026-04-14 12:25:31 +02:00
parent 7d61d6361c
commit dcf1c47328
2 changed files with 2 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ const client = new InfluxDB({ url, token })
const write = client.getWriteApi(org, boatTelemetry);
const querying = client.getQueryApi(org);
console.log("InfluxDB client initialized with config:", { url, org, token: token ? '***' : null });
async function append(measurement, sensor, data) {
const point = new Point(measurement)

View File

@@ -30,6 +30,7 @@ Object.entries(pools).forEach(([name, pool]) => {
async function getClient(db) {
const pool = pools[db];
if (!pool) throw new Error(`Database pool type ${db} does not exist`);
console.log(`Acquiring client for ${db} database... with config:`, config);
return await pool.connect();
}