MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / setupQuietMode

Method setupQuietMode

apps/cli/src/agent/extension-host.ts:308–332  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

306 // ==========================================================================
307
308 private setupQuietMode(): void {
309 // Skip if already set up or if integrationTest mode
310 if (this.originalConsole || this.options.integrationTest) {
311 return
312 }
313
314 // Suppress node warnings.
315 this.originalProcessEmitWarning = process.emitWarning
316 process.emitWarning = () => {}
317 process.on("warning", () => {})
318
319 // Suppress console output.
320 this.originalConsole = {
321 log: console.log,
322 warn: console.warn,
323 error: console.error,
324 debug: console.debug,
325 info: console.info,
326 }
327
328 console.log = () => {}
329 console.warn = () => {}
330 console.debug = () => {}
331 console.info = () => {}
332 }
333
334 private restoreConsole(): void {
335 if (!this.originalConsole) {

Callers 1

constructorMethod · 0.95

Calls 1

onMethod · 0.65

Tested by

no test coverage detected