Track(s):
Dev / DevOps
Audience:
All

Let’s discuss the hidden dangers of inadequate error logging – how silent failures and cryptic stack traces undermine website performance and user satisfaction. For many organizations, we prioritize the next set of features over tackling technical debt and legacy issues. This will always be a balancing act between growth and maintenance; but how do we know when to focus on the backlog of bugs and undiscovered errors? Well, it all starts with a useful, comprehensive error log.

This session will focus on simple best practices for error handling when developing custom code. We will explore the Drupal Logging and Messenger service as a key component to better understanding the health of our websites. Topics include:

  • Anatomy of error handling: a practical look at when and how to catch issues in code and what to do with these errors
  • Mechanics of the Logger service: how to record errors in your custom code and best practices for setting meaningful messages
  • Uses of the Messenger service: displaying error messages to your site visitors so they can resolve issues or have additional context when asking for help
  • Bridging the gap between bugs and insights: demonstrating how proactive error logging transforms obscure errors into actionable insights, empowering engineers to nip potential issues in the bud.

This presentation is for anyone who writes or reviews custom Drupal code with a focus on PHP. While a variety of code examples will be shared, the topic should be approachable to developers of all coding levels. Through compelling real-world examples and hands-on demonstrations, we'll unveil the transformative power of comprehensive error logging and event tracking within the Drupal ecosystem.