Wires callback functions to Supervisor events

Installs: 90 054

Dependents: 1

Suggesters: 0

Security: 0

Stars: 117

Watchers: 9

Forks: 17

Open Issues: 3


v1.0.0 2012-07-22 22:14 UTC

This package is not auto-updated.

Last update: 2022-01-15 14:27:42 UTC


Receives event notifications from Supervisor and sends the parsed notification to a callback function.


  • PHP 5.3
  • Supervisord


The recommended installation method is through Composer.

  1. Add mtdowling/supervisor-event as a dependency in your project's composer.json file:

         "require": {
             "mtdowling/supervisor-event": "*"
  2. Download and install Composer:

     curl -s | php
  3. Install your dependencies:

     php composer.phar install
  4. Require Composer's autoloader

    Composer also prepares an autoload file that's capable of autoloading all of the classes in any of the libraries that it downloads. To use it, just add the following line to your code's bootstrap process:

     require 'vendor/autoload.php';

You can find out more on how to install Composer, configure autoloading, and other best-practices for defining dependencies at

Example event script


// include the composer autoloader
require_once __DIR__ . '/vendor/autoload.php';

use Mtdowling\Supervisor\EventListener;
use Mtdowling\Supervisor\EventNotification;

$listener = new EventListener();
$listener->listen(function(EventListener $listener, EventNotification $event) {
    // Try messing around with supervisorctl to restart processes and see what
    // data is available
    $listener->log(var_export($event->getData(), true));
    return true;

Running the example

Open your supervisord.conf file and add the following:

command=php /path/to/examples/log.php

Replace /path/to with the correct path. More event listener options can be found at

Now run:

supervisorctl reload