Skip to content

Commit

Permalink
fix: orm enable logging on non prod
Browse files Browse the repository at this point in the history
  • Loading branch information
rubiin committed Aug 30, 2024
1 parent 6a5edf4 commit d4efa25
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/common/database/orm.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import process from "node:process";
import { LoadStrategy } from "@mikro-orm/postgresql";
import { TsMorphMetadataProvider } from "@mikro-orm/reflection";
import { SqlHighlighter } from "@mikro-orm/sql-highlighter";
Expand Down Expand Up @@ -36,7 +37,7 @@ export const baseOptions = {
logger: logger.log.bind(logger),
metadataProvider: TsMorphMetadataProvider,
highlighter: new SqlHighlighter(),
debug: true,
debug:!process.env.NODE_ENV.startsWith("prod"),
loadStrategy: LoadStrategy.JOINED,
entityRepository: BaseRepository,
forceUtcTimezone: true,
Expand Down

0 comments on commit d4efa25

Please sign in to comment.