Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Configuring a reporter as an empty array create a memory leak #534
Though obviously an edge case, if a reporter configuration is set to an empty array (essentially blank) then good will write all log messages for that reporter to a stream that is never emptied, resulting in a memory leak. From what I can tell this is due to the check here https://github.com/hapijs/good/blob/master/lib/monitor.js#L128, which should add the
I discovered this problem when I configured a dev mode only reporter, which in my confidence file was achieved by setting the reporter to an empty array. It was only in production that enough logs were generated to make the leak evident.
I am putting together a PR for this issue presently. However I will need to confirm this fixes the memory leak prior to creating the PR.