I’ve recently been evaluating a few centralised logging services to use with a Symfony project.
One of the services that stood out was Loggly.
It’s got a simple to use web UI
and will take input from good old syslog
as well as their shiny custom REST API.
How can this be integrated into a Symfony app? A quick search on the intertubes returns LogglyBundle
but the the project is appears to be quite old and abandoned.
However, looking in the monolog codebase there is a LogglyHandler
available since v1.7.0! It’s really as simple as adding an additonal handler to your
Looking at the LogglyHandler we can see that it’s
using the Loggyly REST API, which sends the alerts over https.
In theory we should be able to use the SyslogUdpHandler, yielding better performance (at the cost of privacy since the transport is not encrypted). But the message would need formatting to match the template as described here first.
So an excersive for another time, writing a LogglyUdpFormatter…