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

@@ -3,6 +3,9 @@ const platformInfo = require('../utility/platformInfo');
const childProcessChecker = require('../utility/childProcessChecker');
const { handleProcessCommunication } = require('../utility/processComm');
const { SSHConnection } = require('../utility/SSHConnection');
const { getLogger } = require('dbgate-tools');
const logger = getLogger();
async function getSshConnection(connection) {
const sshConfig = {
@@ -35,8 +38,8 @@ async function handleStart({ connection, tunnelConfig }) {
tunnelConfig,
});
} catch (err) {
console.log('Error creating SSH tunnel connection:', err.message);
logger.error('Error creating SSH tunnel connection:', err);
process.send({
msgtype: 'error',
connection,