MCPcopy Create free account
hub / github.com/KeyRotate/LibreTV-App / appendToLogFile

Function appendToLogFile

server.mjs:21–28  ·  view source on GitHub ↗
(message)

Source from the content-addressed store, hash-verified

19}
20
21function appendToLogFile(message) {
22 try {
23 fs.appendFileSync(LOG_FILE_PATH, `${new Date().toISOString()} - ${message}\n`);
24 } catch (err) {
25 console.error('Failed to write to log file, logging to console instead:', err);
26 console.log(`[LOG_FILE_FALLBACK] ${message}`);
27 }
28}
29
30// Helper function to read a stream into a string
31async function streamToString(stream) {

Callers 1

server.mjsFile · 0.85

Calls 1

errorMethod · 0.45

Tested by

no test coverage detected