mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-13 13:37:31 -07:00
Better sql log
This commit is contained in:
parent
b890dc349a
commit
594736add2
1 changed files with 4 additions and 2 deletions
|
@ -69,7 +69,9 @@ class MyCustomLogger implements Logger {
|
|||
}
|
||||
|
||||
public logQuery(query: string, parameters?: any[]) {
|
||||
sqlLogger.info(this.highlight(query));
|
||||
if (program.verbose) {
|
||||
sqlLogger.info(this.highlight(query));
|
||||
}
|
||||
}
|
||||
|
||||
public logQueryError(error: string, query: string, parameters?: any[]) {
|
||||
|
@ -158,7 +160,7 @@ export function initDb(justBorrow = false, sync = false, forceRecreate = false)
|
|||
} catch (e) {}
|
||||
}
|
||||
|
||||
const log = program.verbose;
|
||||
const log = process.env.NODE_ENV != 'production';
|
||||
|
||||
return createConnection({
|
||||
type: 'postgres',
|
||||
|
|
Loading…
Reference in a new issue