From 93339b3e425cef4c910555f2f5f7bf19bba0fac8 Mon Sep 17 00:00:00 2001 From: Daniel Lockyer Date: Mon, 16 May 2022 10:53:08 +0100 Subject: [PATCH] Removed unused code for logging in MySQL lib - `mysql2` doesn't support this and we haven't had it enabled for a long time - if we need this feature, we can re-add it with a working implementation --- core/server/data/db/connection.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/core/server/data/db/connection.js b/core/server/data/db/connection.js index 34b5baad6a..f43387ff13 100644 --- a/core/server/data/db/connection.js +++ b/core/server/data/db/connection.js @@ -36,19 +36,6 @@ function configure(dbConfig) { dbConfig.connection.timezone = 'Z'; dbConfig.connection.charset = 'utf8mb4'; dbConfig.connection.decimalNumbers = true; - - // NOTE: disabled so that worker processes can use the db without - // requiring logging and causing file desriptor leaks. - // See https://github.com/TryGhost/Ghost/issues/12496 - // - // const logging = require('@tryghost/logging'); - // const errors = require('@tryghost/errors'); - // dbConfig.connection.loggingHook = function loggingHook(err) { - // logging.error(new errors.InternalServerError({ - // code: 'MYSQL_LOGGING_HOOK', - // err: err - // })); - // }; } return dbConfig;