You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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);
|
|
};
|