mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-09 23:48:36 +01:00
17 lines
409 B
TypeScript
17 lines
409 B
TypeScript
|
|
import fs from 'fs';
|
|
import path from 'path';
|
|
|
|
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);
|
|
if (fs.existsSync(logFullPath)) fs.rmSync(logFullPath);
|
|
} |