node-http-mitm-proxy
node-http-mitm-proxy copied to clipboard
Optional logging tags
When incorporating this module into a larger script you might want to silence this module to get cleaner logging. You can disable logging by http-mitm-proxy by passing silent: true, for example:
proxy.listen({
port: 8080,
forceSNI: true,
silent: true,
});
However, the messages created by this module can be quite useful for debugging, but they can be difficult to relate to this module as they don't reference the module name. Would it be possible to add an option to prefix/format log messages created by this module, e.g.
proxy.listen({
port: 8080,
forceSNI: true,
silent: false,
logPrefix: '[http-mitm-proxy]',
});
This would change the following output:
SNI enabled. Clients not supporting SNI may fail
<...output from other modules...>
https server started on 39715
to
[http-mitm-proxy] SNI enabled. Clients not supporting SNI may fail
<...output from other modules...>
[http-mitm-proxy] https server started on 39715