mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-12-12 13:48:10 +09:00
Disable sql log
This commit is contained in:
parent
6d20c88ffa
commit
22bf8eb86f
@ -76,8 +76,6 @@ class MyCustomLogger implements Logger {
|
||||
}
|
||||
|
||||
export function initDb(justBorrow = false, sync = false, log = false) {
|
||||
const enableLogging = log || !['production', 'test'].includes(process.env.NODE_ENV || '');
|
||||
|
||||
try {
|
||||
const conn = getConnection();
|
||||
return Promise.resolve(conn);
|
||||
@ -92,8 +90,8 @@ export function initDb(justBorrow = false, sync = false, log = false) {
|
||||
database: config.db.db,
|
||||
synchronize: process.env.NODE_ENV === 'test' || sync,
|
||||
dropSchema: process.env.NODE_ENV === 'test' && !justBorrow,
|
||||
logging: enableLogging,
|
||||
logger: enableLogging ? new MyCustomLogger() : undefined,
|
||||
logging: log,
|
||||
logger: log ? new MyCustomLogger() : undefined,
|
||||
entities: [
|
||||
Meta,
|
||||
Instance,
|
||||
|
Loading…
Reference in New Issue
Block a user