show logs from menu

This commit is contained in:
Jan Prochazka
2023-01-22 10:31:16 +01:00
parent 1bf8f38793
commit 5249713a3c
6 changed files with 44 additions and 10 deletions

View File

@@ -8,6 +8,8 @@ const processArgs = require('./processArgs');
const consoleObjectWriter = require('../shell/consoleObjectWriter');
const { getLogger } = require('dbgate-tools');
let logsFilePath;
const createDirectories = {};
const ensureDirectory = (dir, clean) => {
if (!createDirectories[dir]) {
@@ -135,6 +137,14 @@ function migrateDataDir() {
}
}
function setLogsFilePath(value) {
logsFilePath = value;
}
function getLogsFilePath() {
return logsFilePath;
}
migrateDataDir();
module.exports = {
@@ -153,4 +163,6 @@ module.exports = {
getPluginBackendPath,
resolveArchiveFolder,
clearArchiveLinksCache,
getLogsFilePath,
setLogsFilePath,
};