mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 07:48:37 +01:00
refactoring dashboard
This commit is contained in:
17
scripts/dashboard/clear-logs.js
Normal file
17
scripts/dashboard/clear-logs.js
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
const dashboardPath = path.join(__dirname, '../../dashboard');
|
||||
|
||||
const logNames = [
|
||||
"winston-debug.ndjson",
|
||||
"winston-exceptions.ndjson",
|
||||
"winston-logs.ndjson",
|
||||
"winston-rejections.ndjson",
|
||||
]
|
||||
|
||||
for (const logName of logNames) {
|
||||
const logFullPath = path.join(dashboardPath, logName);
|
||||
fs.rmSync(logFullPath);
|
||||
}
|
||||
Reference in New Issue
Block a user