Skip to content

Commit

Permalink
chore: dont log postgres notices
Browse files Browse the repository at this point in the history
  • Loading branch information
zackpollard committed Jan 16, 2025
1 parent a1a5c2d commit beda625
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/src/repositories/config.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Request, Response } from 'express';
import { PostgresJSDialect } from 'kysely-postgres-js';
import { CLS_ID } from 'nestjs-cls';
import { join, resolve } from 'node:path';
import postgres from 'postgres';
import postgres, { Notice } from 'postgres';
import { citiesFile, excludePaths, IWorker } from 'src/constants';
import { Telemetry } from 'src/decorators';
import { EnvDto } from 'src/dtos/env.dto';
Expand Down Expand Up @@ -99,6 +99,11 @@ const getEnv = (): EnvData => {
}

const driverOptions = {
onnotice: (notice: Notice) => {
if (notice['severity'] !== 'NOTICE') {
console.warn('Postgres notice:', notice);
}
},
max: 10,
types: {
date: {
Expand Down

0 comments on commit beda625

Please sign in to comment.