Writing logs to syslog with PHP and Monolog on Mac OS

Oleg Posyniak · June 19, 2018

Most *nix-based sustems support syslog storage for different types of system logs. On Mac OS it’s also present and we can use it.


Syslog implementation exists as part of Syslog Handler

To use it let’c create Monolog object and configure handler:

    $monolog = new Monolog('default');
        new SyslogHandler('My log')


Once you configure this handler, open Console application and filter by:

  • library: php

You will see something like this:


** Note

If you do not see debug messages, go to Action -> Enable Debug Messages

Twitter, Facebook