diff --git a/packages/tests/src/api/server/logs.ts b/packages/tests/src/api/server/logs.ts index 29cd5ea380e..ad6b072fb9a 100644 --- a/packages/tests/src/api/server/logs.ts +++ b/packages/tests/src/api/server/logs.ts @@ -262,6 +262,14 @@ describe('Test logs', function () { }) }) + describe('With some log options', function () { + + it('Should not crash when enabling `prettify_sql` config', async function () { + await server.kill() + await server.run({ log: { prettify_sql: true } }) + }) + }) + after(async function () { await cleanupTests([ server ]) }) diff --git a/server/core/helpers/logger.ts b/server/core/helpers/logger.ts index 9449f26b416..17aa4f84df9 100644 --- a/server/core/helpers/logger.ts +++ b/server/core/helpers/logger.ts @@ -19,7 +19,7 @@ const consoleLoggerFormat = format.printf(info => { if (info.sql) { if (CONFIG.LOG.PRETTIFY_SQL) { additionalInfos += '\n' + sqlFormat(info.sql, { - language: 'sql', + language: 'postgresql', tabWidth: 2 }) } else {