Logging

A good logging strategy will also help you to troubleshoot issues in addition to a good error handler strategy. Some pieces of information don't need to be sent to the end user, but it would be helpful for you to be able to trace all errors in logging files in order to understand what is going on.

It is recommended that you log every operation of an application. This log strategy means logging more than just errors that occur; it means that critical operations should also be logged, for instance, so that you can have more control over who is doing what for audit purposes. Applications can log at a code level (debugging, for instance) and at a user request level for audits and forbidden access.

Currently, winston is the most widely-used ...

Get Hands-On RESTful Web Services with TypeScript 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.