We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When calling winston.loggers.get("category1"), if a logger with the category of "category1" is not found, it will automatically be created.
winston.loggers.get("category1")
"category1"
This means if we run the following code we will create 1000 separate Winston loggers.
for (let i = 0; i < 1000; i++) { winston.loggers.get("category" + i); }
Similarly, when any endpoint is called, the following code is run, resulting in a new Winston logger being created.
cybersource-rest-client-node/src/authentication/logging/Logger.js
Line 26 in 31baaba
To my knowledge, this logger is never closed, and so new Winston loggers pile up on the heap.
The text was updated successfully, but these errors were encountered:
It's worth noting this issue (and several others) have already been fixed in Paciolan's TypeScript fork of this SDK.
Sorry, something went wrong.
🐛 fix memory leak
6b65af0
Assuming there is no significance in having a unique logger for each call, this fixes CyberSource#141
9b64f1e
I've created a PR to fix this.
Successfully merging a pull request may close this issue.
When calling
winston.loggers.get("category1")
, if a logger with the category of"category1"
is not found, it will automatically be created.This means if we run the following code we will create 1000 separate Winston loggers.
Similarly, when any endpoint is called, the following code is run, resulting in a new Winston logger being created.
cybersource-rest-client-node/src/authentication/logging/Logger.js
Line 26 in 31baaba
To my knowledge, this logger is never closed, and so new Winston loggers pile up on the heap.
The text was updated successfully, but these errors were encountered: