Skip to content
Snippets Groups Projects
Commit bfcda7cc authored by syuilo's avatar syuilo
Browse files

Better sql log

parent c52aeb66
No related branches found
No related tags found
No related merge requests found
......@@ -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',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment