Add option to enable MikroORM database debug logging

This commit is contained in:
William Oldham
2023-11-18 19:21:02 +00:00
parent 6f48b62275
commit 8e10eb7d59
3 changed files with 14 additions and 3 deletions

View File

@@ -14,8 +14,10 @@ export function getORM() {
export async function setupMikroORM() {
log.info(`Connecting to postgres`, { evt: 'connecting' });
const mikro = await createORM(conf.postgres.connection, (msg) =>
log.info(msg),
const mikro = await createORM(
conf.postgres.connection,
conf.postgres.debugLogging,
(msg) => log.info(msg),
);
if (conf.postgres.syncSchema) {