Redact credentials

This commit is contained in:
Ilango 2025-07-30 12:12:06 +05:30
parent 7d446f38c4
commit f266e26aa2
1 changed files with 8 additions and 2 deletions

View File

@ -152,7 +152,10 @@ export class QueueManager {
// Add connection event logging for prediction queue
if (predictionQueue.getQueue().opts.connection) {
const connInfo = predictionQueue.getQueue().opts.connection || {}
logger.info(`[QueueManager] Prediction queue connected to Redis: ${JSON.stringify(connInfo)}`)
const connInfoString = JSON.stringify(connInfo)
.replace(/"username":"[^"]*"/g, '"username":"[REDACTED]"')
.replace(/"password":"[^"]*"/g, '"password":"[REDACTED]"')
logger.info(`[QueueManager] Prediction queue connected to Redis: ${connInfoString}`)
}
this.predictionQueueEventsProducer = new QueueEventsProducer(predictionQueue.getQueueName(), {
@ -172,7 +175,10 @@ export class QueueManager {
// Add connection event logging for upsert queue
if (upsertionQueue.getQueue().opts.connection) {
const connInfo = upsertionQueue.getQueue().opts.connection || {}
logger.info(`[QueueManager] Upsert queue connected to Redis: ${JSON.stringify(connInfo)}`)
const connInfoString = JSON.stringify(connInfo)
.replace(/"username":"[^"]*"/g, '"username":"[REDACTED]"')
.replace(/"password":"[^"]*"/g, '"password":"[REDACTED]"')
logger.info(`[QueueManager] Upsert queue connected to Redis: ${connInfoString}`)
}
if (serverAdapter) {