PISAresearch / pisa

Accountable Watching Service
https://pisa.watch
28 stars 9 forks source link

Logger.child can be a memory leak #427

Closed yahgwai closed 4 years ago

yahgwai commented 4 years ago

Logger.child adds the new child logger to a private children property. We currently call child for each request, which will add a child logger which can never be collected, since we never collect the parent.

I think the best option is to add a "local", or "ephemeral", child which does not get added to the children property. Alternatively we could change the name of child to "storedChild".