MCPcopy Index your code
hub / github.com/microsoft/vscode-cpptools / handleOutputLogging

Function handleOutputLogging

Extension/src/SSH/sshCommandRunner.ts:318–344  ·  view source on GitHub ↗
(data: string)

Source from the content-addressed store, hash-verified

316 };
317
318 const handleOutputLogging = (data: string): void => {
319 let nextPauseState: boolean | undefined;
320 if (args.marker) {
321 const pauseMarker: string = getPauseLogMarker(args.marker);
322 const pauseIdx: number = data.lastIndexOf(pauseMarker);
323 if (pauseIdx >= 0) {
324 data = data.substring(0, pauseIdx + pauseMarker.length);
325 nextPauseState = true;
326 }
327
328 const resumeIdx: number = data.lastIndexOf(getResumeLogMarker(args.marker));
329 if (resumeIdx >= 0) {
330 data = data.substring(resumeIdx);
331 nextPauseState = false;
332 }
333 }
334
335 // Log the chunk of data that includes the pause/resume markers,
336 // so unpause first and pause after logging
337 if (!logIsPaused) {
338 logReceivedData(data, nickname);
339 }
340
341 if (typeof nextPauseState === 'boolean') {
342 logIsPaused = nextPauseState;
343 }
344 };
345
346 const handleTerminalOutput = async (dataWrite: vscode.TerminalDataWriteEvent): Promise<void> => {
347 if (loggingLevel > 0) {

Callers 1

handleTerminalOutputFunction · 0.85

Calls 3

getPauseLogMarkerFunction · 0.85
getResumeLogMarkerFunction · 0.85
logReceivedDataFunction · 0.85

Tested by

no test coverage detected