mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-06-25 04:20:22 +02:00
19 lines
340 B
JavaScript
19 lines
340 B
JavaScript
'use strict';
|
|
|
|
var path = require('path');
|
|
var fs = require('fs');
|
|
|
|
var Logs = module.exports;
|
|
|
|
Logs.path = path.join(__dirname, '..', '..', 'logs', 'output.log');
|
|
|
|
Logs.get = function (callback) {
|
|
fs.readFile(Logs.path, {
|
|
encoding: 'utf-8',
|
|
}, callback);
|
|
};
|
|
|
|
Logs.clear = function (callback) {
|
|
fs.truncate(Logs.path, 0, callback);
|
|
};
|