fixed up logger error to make it better to handle in code
This commit is contained in:
parent
db66687f48
commit
d0bb4db042
18 changed files with 51 additions and 45 deletions
|
|
@ -138,7 +138,7 @@ export class PostgreSQLClient {
|
|||
} catch (error) {
|
||||
const executionTime = Date.now() - startTime;
|
||||
this.logger.error(`Query failed after ${executionTime}ms:`, {
|
||||
error: (error as Error).message,
|
||||
error,
|
||||
query: text,
|
||||
params
|
||||
});
|
||||
|
|
@ -320,8 +320,8 @@ export class PostgreSQLClient {
|
|||
private setupErrorHandlers(): void {
|
||||
if (!this.pool) return;
|
||||
|
||||
this.pool.on('error', (err) => {
|
||||
this.logger.error('PostgreSQL pool error:', err);
|
||||
this.pool.on('error', (error) => {
|
||||
this.logger.error('PostgreSQL pool error:', error);
|
||||
});
|
||||
|
||||
this.pool.on('connect', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue