MCPcopy Create free account
hub / github.com/Marus/cortex-debug / openLogFile

Method openLogFile

src/frontend/rtt_terminal.ts:88–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86 }
87
88 private openLogFile() {
89 this.logFd = -1;
90 if (this.options.logfile) {
91 try {
92 this.logFd = fs.openSync(this.options.logfile, 'w');
93 }
94 catch (e) {
95 const msg = `Could not open file ${this.options.logfile} for writing. ${e.toString()}`;
96 console.error(msg);
97 magentaWrite(msg, this.ptyTerm);
98 }
99 }
100 }
101
102 private writeNonBinary(buf: Buffer) {
103 let start = 0;

Callers 2

constructorMethod · 0.95
tryReuseMethod · 0.95

Calls 2

magentaWriteFunction · 0.90
toStringMethod · 0.80

Tested by

no test coverage detected