LLevelUp
0
← Back to topic

Logs and Debugging

Production debugging starts with evidence. Logs answer what happened, when, and often why.

journalctl -u nginx -f
journalctl -u my-app --since "1 hour ago"
sudo tail -f /var/log/nginx/error.log

Check resources too:

df -h
free -m
systemctl status my-app

WARNING

Logs should not contain passwords, API keys, auth tokens, or full private payloads.

Further Learning

  • “journalctl examples” — querying systemd logs
  • “Nginx access error logs” — proxy debugging
  • “Linux out of disk debug” — common server failure