MCPcopy
hub / github.com/codedogQBY/ReadAny / clearLogs

Function clearLogs

packages/core/src/feedback/feedback-service.ts:291–304  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

289
290/** Clear all log files */
291export async function clearLogs(): Promise<void> {
292 _pendingLines = [];
293 try {
294 const platform = getPlatformService();
295 await ensureLogDir();
296 // Delete current day's log
297 const todayPath = await getLogFilePath(getTodayDateStr());
298 if (await platform.exists(todayPath)) {
299 await platform.deleteFile(todayPath);
300 }
301 } catch {
302 // Ignore
303 }
304}
305
306/** Install console/error capture into the file-based log system. Safe to call more than once. */
307export function installFeedbackLogCapture(): () => void {

Callers 1

Calls 6

getPlatformServiceFunction · 0.90
ensureLogDirFunction · 0.85
getLogFilePathFunction · 0.85
getTodayDateStrFunction · 0.85
existsMethod · 0.65
deleteFileMethod · 0.65

Tested by

no test coverage detected