Return to profile for Alain Schlesser

Ultimate Guide to Logging

40 minute intermediate seminar

Description/Proposal

Complex sites tend to have a lot going on behind the scenes, as most processing work is rightly hidden from the user.

This is all great and generally works as expected until it doesn't. In the best case, you'll immediately notice an error or exception and can work on a fix. In the worst case, you'll get contacted by your client that the sales of the last two months had actually never been charged by the system. Ouch!

Proper logging allows you to see what is going on within your system and create targeted notifications that let you know instantly when something's amiss.

We'll cover:

  • PSR-3 and what it means for PHP development
  • Log levels and contextual data
  • Basic usage of Monolog
  • Using a logging error handler
  • Injecting external logging data (using Gravity Forms as an example)
  • Filtering sensitive data
  • Demultiplication and other behavioral modifications
  • Sending logs to a Graylog server or a Slack channel