Logging Update - IPadress & user Email if possible

This commit is contained in:
2024-09-23 13:45:46 +02:00
parent 974a6503ef
commit 1282d30b49
16 changed files with 163 additions and 22 deletions

View File

@@ -25,7 +25,8 @@ const { Pool } = pkg;
logQuery(query: string, params: unknown[]): void {
const ip = cls.get('ip') || 'unknown';
const countryCode = cls.get('countryCode') || 'unknown';
logger.info(`IP: ${ip} (${countryCode}) - Query: ${query} - Params: ${JSON.stringify(params)}`);
const username = cls.get('username') || 'unknown';
logger.info(`IP: ${ip} (${countryCode}) (${username}) - Query: ${query} - Params: ${JSON.stringify(params)}`);
},
};