Skip to content
Web Design & Development

Logging and Error Monitoring, Done Properly

Recording application events and errors, and alerting the team when something breaks, so problems are found before customers report them.

MediaScaleUp Editorial Team 2 min read 10 views
Logging and Error Monitoring, Done Properly

At a glance

  • OWASP guidance log security-relevant events such as authentication failures and access control failures
  • Sensitive data passwords, tokens and card data must never be logged
  • Log levels separate debug, info, warning and error messages
  • Alerting notify the team on error spikes and critical failures

Why it matters

Why it matters: Without logs and alerts, failures in checkout, sign-in or integrations can go unnoticed for days.

Best practice

  • Use structured logs with request IDs
  • Send errors to a monitoring service with alerts
  • Log authentication and permission failures
  • Rotate and retain logs according to policy
  • Review error trends after each release
What to do and what to avoid with logging and error monitoring, side by side
Good practice against the usual mistakes, from the sources listed below.

Common pitfalls

Watch out for:

  • Logging personal or payment data
  • Alerts so noisy they are ignored
  • Errors shown to users with stack traces
  • Logs kept only on a single server

When to call in a specialist

Bottom line Bring in help when errors are discovered by customers first, or when logs are too noisy to use.

Where this comes from

The figures and practices above come from the sources listed.

Working on something like this?

We take on Web Design & Development work for teams who want it done once, properly. Tell us what you are building and we will tell you honestly whether we are the right studio for it. Start a project.

Where to go next

Spotted something wrong? Report an error on this page. We correct on the page and say what changed.

All services

The work behind this article, and what it costs.

MediaScaleUp Editorial Team

Articles here are researched, written and checked by the MediaScaleUp studio team before they are published, and dated when they are reviewed.

Keep reading

More in Web Design & Development