Server logging
In any production system, server logs are an integral part of monitoring and troubleshooting a live running system. For Node applications, this is no different. There are a couple of handy modules that we will take a quick look at to enhance our server logging so that it can be more useful in a production setting.
The first module is named rotating-file-stream, and will rotate logs on the server according to a configurable set of rules. When logging in a production environment, we need to take care that server logs do not get too large, otherwise we could run the risk of running out of disk space. With a rotating log, a new file will be created after a period of time, with a new name, and the maximum size of log files can be ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access