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?
Checks
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
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?
What http-proxy-middleware configuration are you using?
What OS/version and node/version are you seeing the problem?
Additional context (optional)
No response