Grokking ExpressJS
Vote

0% completed

​

Logging in Production

Production needs more from logs than development does. A developer reads the terminal while reproducing one bug. In production, nobody watches, thousands of requests mix together, and the log is often the only record of what went wrong. Chapter 9 set up morgan and Winston for the task API. This lesson adapts that setup for production. It connects the lines that belong to one request and decides what a log must never contain.

A Logger for Production

Chapter 9 put the logger in logger.js, which exports one Winston logger for the whole app. It prints JSON lines, writes errors to `error

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content