mirror of
https://github.com/zadam/trilium.git
synced 2025-10-29 09:16:45 +01:00
15 lines
344 B
JavaScript
15 lines
344 B
JavaScript
|
|
"use strict";
|
||
|
|
|
||
|
|
const fs = require('fs');
|
||
|
|
const dateUtils = require('../../services/date_utils');
|
||
|
|
const {LOG_DIR} = require('../../services/data_dir.js');
|
||
|
|
|
||
|
|
async function getBackendLog() {
|
||
|
|
const file = `${LOG_DIR}/trilium-${dateUtils.localNowDate()}.log`;
|
||
|
|
|
||
|
|
return fs.readFileSync(file, 'utf8');
|
||
|
|
}
|
||
|
|
|
||
|
|
module.exports = {
|
||
|
|
getBackendLog
|
||
|
|
};
|