Knowing what happens in production.
WHAT TO LOG
Startup problems Handled errors with context Significant actions External call failures
WHAT NOT TO LOG
Credentials Full personal data Every routine request
WHAT TO CONFIGURE
A channel that rotates files A retention period An appropriate level
WHY ROTATION
A single log file grows until it fills your disk.
WHAT TO ADD TO EVERY ERROR ENTRY
Enough context to diagnose: what failed, with what input, for which user.
WHAT TO CONSIDER
Sending errors to an external service, which alerts you.
WHY
Otherwise nobody reads the log until a customer complains.
WHAT TO MONITOR EXTERNALLY
That the site responds That scheduled tasks ran That queues are being processed
WHERE TO SEND ALERTS
An address not dependent on the application.
WHAT TO REVIEW
The log after every deployment, and weekly thereafter.
WHAT TO ACT ON
Repeated errors, which indicate something genuinely broken.