mirror of
https://github.com/vale981/doccam-pi
synced 2025-03-04 17:01:40 -05:00
fixlogs
This commit is contained in:
parent
17f7b8e25a
commit
ee41966eef
1 changed files with 2 additions and 1 deletions
3
main.js
3
main.js
|
@ -313,10 +313,11 @@ var commandHandlers = function commandHandlers(command, cb) {
|
|||
});
|
||||
},
|
||||
getLogs: function() {
|
||||
fs.readFile(__dirname + '/' + config.logPath, 'utf-8', function(err, data) {
|
||||
fs.readFile(__dirname + '/process.log', 'utf-8', function(err, data) {
|
||||
if (err) throw err;
|
||||
|
||||
let lines = data.trim().split('\n').slice(-100);
|
||||
console.log(lines);
|
||||
lines.shift();
|
||||
lines.pop();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue