PINO JSON logging

This commit is contained in:
Jan Prochazka
2023-01-21 17:32:28 +01:00
parent dd230b008f
commit 4d93be61b5
47 changed files with 429 additions and 113 deletions

View File

@@ -8,10 +8,13 @@ import type {
ViewInfo,
} from 'dbgate-types';
import _flatten from 'lodash/flatten';
import _uniqBy from 'lodash/uniqBy'
import _uniqBy from 'lodash/uniqBy';
import { getLogger } from './getLogger';
import { SqlDumper } from './SqlDumper';
import { extendDatabaseInfo } from './structureTools';
const logger = getLogger();
interface SqlGeneratorOptions {
dropTables: boolean;
checkIfTableExists: boolean;
@@ -82,7 +85,7 @@ export class SqlGenerator {
}
private handleException = error => {
console.log('Unhandled error', error);
logger.error('Unhandled error', error);
this.isUnhandledException = true;
};