http-proxy-middleware
http-proxy-middleware copied to clipboard
webpack-dev-server config proxyTable -logLevel:‘debug’ ,can not work
Checks
- [X] I understand project setup issues should be asked on StackOverflow or in GitHub Discussions.
- [X] I updated to latest
http-proxy-middleware.
Describe the bug (be clear and concise)
function getInstance() { if (!loggerInstance) { loggerInstance = new Logger(); } return loggerInstance; }
// log will log messages, regardless of logLevels log() { this.provider.log(this._interpolate.apply(null, arguments)); } debug() { if (this._showLevel('debug')) { this.provider.debug(this._interpolate.apply(null, arguments)); } } info() { if (this._showLevel('info')) { this.provider.info(this._interpolate.apply(null, arguments)); } } warn() { if (this._showLevel('warn')) { this.provider.warn(this._interpolate.apply(null, arguments)); } }
const logger = (0, logger_1.getInstance)(); for (const rule of rulesCache) { if (rule.regex.test(path)) { result = result.replace(rule.regex, rule.value); logger.debug('[HPM] Rewriting path from "%s" to "%s"', path, result); break; } }
Step-by-step reproduction instructions
1. ...
2. ...
Expected behavior (be clear and concise)
please update this bug and fix it:logger.provider.debug/info/log...
How is http-proxy-middleware used in your project?
for webpack
What http-proxy-middleware configuration are you using?
logger.getInstance
What OS/version and node/version are you seeing the problem?
node 12.22.0
window 10
Additional context (optional)
No response