feat: add logging for InfluxDB client initialization and PostgreSQL client acquisition
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user