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
This commit is contained in:
Daniel Lockyer 2022-05-16 10:53:08 +01:00
parent 9957c2a77c
commit 93339b3e42
No known key found for this signature in database
GPG Key ID: D21186F0B47295AD

View File

@ -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;