refactor(app-shell,app-shell-odd): update winston and improve logging #16516
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update winston which is what we use for logging on the node side to the most recent version (3.15) so that we can use
logger.child()
, which lets you override logger metadata without having to create another logger instance.The reason to do this is that each full winston logger instance hangs event listeners off its shared transports (winstonjs/winston#1334) which results in annoying node warning messages about memory leaks that aren't real and are just based on "did you add more than a magic number of listeners to this event". With the child logs, nothing adds the events, and we don't get the warnings.
Also, get rid of the file logging to
/app/ODD/logs/error.log
and/app/ODD/logs/combined.log
, because we're already sending everything to journald via the console and using that to provide the logs via http so it's just extra storage wear and space usage that we don't actually need.testing