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

@@ -1,5 +1,12 @@
const shell = require('./shell');
const { setLogger, getLogger } = require('dbgate-tools');
const processArgs = require('./utility/processArgs');
const pino = require('pino');
if (processArgs.listenApi) {
// configure logger
}
const shell = require('./shell');
const dbgateTools = require('dbgate-tools');
global['DBGATE_TOOLS'] = dbgateTools;
@@ -8,7 +15,7 @@ if (processArgs.startProcess) {
const proc = require('./proc');
const module = proc[processArgs.startProcess];
module.start();
}
}
if (processArgs.listenApi) {
const main = require('./main');
@@ -17,5 +24,6 @@ if (processArgs.listenApi) {
module.exports = {
...shell,
getLogger,
getMainModule: () => require('./main'),
};