MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / clearLogFile

Function clearLogFile

cli/src/utils/logger.ts:98–120  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

96}
97
98export function clearLogFile(): void {
99 const projectRoot = getProjectRoot()
100 const defaultLog = path.join(projectRoot, 'debug', 'cli.jsonl')
101 const targets = new Set<string>()
102
103 if (logPath) {
104 targets.add(logPath)
105 }
106 targets.add(defaultLog)
107
108 for (const target of targets) {
109 try {
110 if (existsSync(target)) {
111 unlinkSync(target)
112 }
113 } catch {
114 // Ignore errors when clearing logs
115 }
116 }
117
118 logPath = undefined
119 pinoLogger = undefined
120}
121
122function sendAnalyticsAndLog(
123 level: LogLevel,

Callers 1

mainFunction · 0.90

Calls 1

getProjectRootFunction · 0.90

Tested by

no test coverage detected