node-http-mitm-proxy icon indicating copy to clipboard operation
node-http-mitm-proxy copied to clipboard

Is there a flag for "silent" mode?

Open RikaShiro opened this issue 1 year ago • 2 comments

I don't need the logs printed by proxy by default standard, since I have to print something else on my own. Is there any way to disable the default logs? mitm

RikaShiro avatar Mar 22 '23 12:03 RikaShiro

That's definitely needed, and apparently existed at some point. See this PR that introduced a silent flag, this one that removed the silent flag in favor of the debug package with the possibility to use an env var to achieve the same thing.

And unfortunately, this commit did remove the debug package implementation while migrating to typescript, leaving us with no option (that I know of) to stop logs from being printed out, that's annoying. Did you find anything @RikaShiro ? @joeferner Any hidden way of achieving that or plans to get this option back ?

toniopelo avatar Dec 07 '23 17:12 toniopelo

Awful, but functional workaround: Overriding console.log and the other console functions. Might not be suitable for all use cases.

timvahlbrock avatar Feb 12 '24 20:02 timvahlbrock