Chapter 9. Error Handling, Debugging, and Logging

In this chapter, we will cover:

  • Using different log routes
  • Analyzing the Yii error stack trace
  • Logging and using the context information
  • Implementing your own smart 404 handler

Introduction

It is not possible to create a bug-free application if it is relatively complex, so developers have to detect errors and deal with them as fast as possible. Yii has a good set of utility features to handle logging and handling errors. Moreover, in the debug mode, Yii gives you a stack trace if there is an error. Using it, you can fix errors faster.

In this chapter, we will review logging, analyzing the exception stack trace, and implementing our own error handler.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.174.55