mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 07:46:00 +00:00
@@ -4,11 +4,16 @@ const fs = require('fs');
|
||||
const moment = require('moment');
|
||||
const path = require('path');
|
||||
const { logsdir, setLogsFilePath, getLogsFilePath } = require('./utility/directories');
|
||||
const platformInfo = require('./utility/platformInfo');
|
||||
|
||||
const logger = getLogger('apiIndex');
|
||||
|
||||
process.on('uncaughtException', err => {
|
||||
logger.fatal(extractErrorLogData(err), 'Uncaught exception');
|
||||
if (err?.['code'] == 'EPIPE' && platformInfo.isForkedApi) {
|
||||
// stop subprocess on EPIPE errors
|
||||
process.exit(0);
|
||||
}
|
||||
});
|
||||
|
||||
if (processArgs.startProcess) {
|
||||
|
||||
Reference in New Issue
Block a user