MCPcopy
hub / github.com/volcengine/MineContext / logToBackendFile

Function logToBackendFile

frontend/src/main/backend.ts:186–201  ·  view source on GitHub ↗
(message)

Source from the content-addressed store, hash-verified

184
185// Helper function to log to backend log file
186export function logToBackendFile(message) {
187 if (!backendLogFile) {
188 backendLogFile = createBackendLogFile()
189 }
190
191 const timestamp = new Date().toISOString()
192 const logMessage = `[${timestamp}] ${message}`
193
194 safeLog.log(logMessage)
195
196 try {
197 fs.appendFileSync(backendLogFile, logMessage + '\n')
198 } catch (error) {
199 safeLog.error('Failed to write to backend log file:', error)
200 }
201}
202
203export function stopBackendServer() {
204 if (backendProcess) {

Callers 12

isPortAvailableFunction · 0.85
findAvailablePortFunction · 0.85
checkBackendHealthFunction · 0.85
stopBackendServerFunction · 0.85
forceKillBackendProcessFunction · 0.85
killProcessByPortFunction · 0.85
ensureBackendRunningFunction · 0.85
startBackendServerFunction · 0.85
startBackendInBackgroundFunction · 0.85
stopBackendServerSyncFunction · 0.85
killProcessByPortSyncFunction · 0.85
setBackendStatusFunction · 0.85

Calls 2

createBackendLogFileFunction · 0.85
errorMethod · 0.80

Tested by

no test coverage detected