mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-01 04:09:51 +01:00
16 lines
341 B
JavaScript
16 lines
341 B
JavaScript
'use strict';
|
|
|
|
const path = require('path');
|
|
const fs = require('fs');
|
|
const Logs = module.exports;
|
|
|
|
Logs.path = path.resolve(__dirname, '../../logs/output.log');
|
|
|
|
Logs.get = async function () {
|
|
return await fs.promises.readFile(Logs.path, 'utf-8');
|
|
};
|
|
|
|
Logs.clear = async function () {
|
|
return await fs.promises.truncate(Logs.path, 0);
|
|
};
|