Skip to content

Commit

Permalink
chore: remove health check queries being printed to console.
Browse files Browse the repository at this point in the history
  • Loading branch information
mishraomp authored and DerekRoberts committed Jan 6, 2025
1 parent bdb16f9 commit be4132c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/src/prisma.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class PrismaService extends PrismaClient<Prisma.PrismaClientOptions, 'query'> im
async onModuleInit() {
await this.$connect();
this.$on<any>('query', (e: Prisma.QueryEvent) => {
// dont print the health check queries
if(e?.query?.includes("SELECT 1")) return;
this.logger.log(
`Query: ${e.query} - Params: ${e.params} - Duration: ${e.duration}ms`,
);
Expand Down

0 comments on commit be4132c

Please sign in to comment.