From 9a6a1f8462ee28ab5789c5af0ed508f6fa1ff813 Mon Sep 17 00:00:00 2001 From: Daniel Petrov Date: Mon, 14 Oct 2024 17:44:39 +0300 Subject: [PATCH] feat(logs): disable logs in prod env (#1203) --- server/config/sequelize.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/config/sequelize.js b/server/config/sequelize.js index af5cdfa11..a0da95220 100644 --- a/server/config/sequelize.js +++ b/server/config/sequelize.js @@ -55,10 +55,12 @@ exports.staging = { exports.production = { sequelize: function (api) { - return parseDatabaseUrl(process.env.DATABASE_URL, { + const config = parseDatabaseUrl(process.env.DATABASE_URL, { autoMigrate: !process.env.DISABLE_AUTO_MIGRATE, loadFixtures: false }) + if (!process.env.LOG_DB) { config.logging = false } + return config } }