Improve log handling
This commit is contained in:
@@ -57,6 +57,7 @@ import { Antenna } from '../models/entities/antenna';
|
||||
import { AntennaNote } from '../models/entities/antenna-note';
|
||||
import { PromoNote } from '../models/entities/promo-note';
|
||||
import { PromoRead } from '../models/entities/promo-read';
|
||||
import { program } from '../argv';
|
||||
|
||||
const sqlLogger = dbLogger.createSubLogger('sql', 'white', false);
|
||||
|
||||
@@ -149,7 +150,7 @@ export const entities = [
|
||||
...charts as any
|
||||
];
|
||||
|
||||
export function initDb(justBorrow = false, sync = false, log = false, forceRecreate = false) {
|
||||
export function initDb(justBorrow = false, sync = false, forceRecreate = false) {
|
||||
if (!forceRecreate) {
|
||||
try {
|
||||
const conn = getConnection();
|
||||
@@ -157,6 +158,8 @@ export function initDb(justBorrow = false, sync = false, log = false, forceRecre
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
const log = program.verbose;
|
||||
|
||||
return createConnection({
|
||||
type: 'postgres',
|
||||
host: config.db.host,
|
||||
|
Reference in New Issue
Block a user