-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
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.
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.
var loggerCategoryRandomiser = Math.floor(Math.random() * (1000000000 - 100 + 1)) + 100; |
To my knowledge, this logger is never closed, and so new Winston loggers pile up on the heap.
Metadata
Metadata
Assignees
Labels
No labels