Logging is more than just appending to a file. Logging can be a critical piece of infrastructure that allows reconstructing what happened over disparate systems for security auditing, debugging, and error post-mortems. Without it, you’re flying blind.
In this March 1st, 2018 presentation, Brent Laminack starts with plain old error_log(), moves up the food chain to syslog and examines its capacities and limitations. Next, he introduces us to one of the better open source PHP logging packages—MonoLog. Brent shows how it’s built into Laravel and how to call it from MySQL.
All this is for naught without some way to sort and filter the thousands of logging messages. Brent demonstrates a modern open-source syslogging package: Graylog. He demonstrates how to search and sort the messages we created in our PHP apps. He’ll also look at some of the ways Graylog provides to work around the limitations of Syslog using Graylog extractors which are the easiest to use and how to construct easy-to-parse messages in our PHP code.
About Brent: Brent Laminack has been using PHP since PHP 4 was introduced, and been using Joomla for its entire 10-year lifespan. He’s the organizer of the Joomla User Group Atlanta (meetup.com/atlantajoomla/) and former leader of the Atlanta Unix Users’ Group. He’s a long-time member of AtlantaPHP and attends when time and tide allow. He tries to help the local Open Source community keep up with itself by running OSSAtlanta.org. He teaches classes at Emory Continuing Education and Gwinnett Tech. His current full-time gig is a Senior LAMP engineer/PHP programmer at ClientCommand, a company that helps local car dealers with their marketing.