Slack log engine for CakePHP

1.0.0 2018-07-17 17:16 UTC

This package is auto-updated.

Last update: 2022-05-17 05:11:48 UTC


This is CakePHP plugin to provide a log engine that post to slack using incoming webhooks.

Please see detail how to configure webhooks on slack.

The engine uses Slack for PHP and is just thin wrapper for the library.


composer require jeffersonsimaogoncalves/cakephp-slack-log-engine


  • PHP 7
  • CakePHP 3.x


Configure log

In your app.php, you can configure like:

'Log' => [
    'error' => [
        'className' => 'SlackLogEngine\Log\Engine\SlackLogEngine',
        // Your slack hook URL here
        'hookUrl' => '',
        // Send logs of following levels to slack
        'levels' => ['error', 'critical', 'alert', 'emergency'],

Log options

Either client or hookUrl is required.

  • hookUrl [string] Slack hook url.
  • client [\Maknz\Slack\Client] Slack client instance for custom.
  • clientClass [string(optional)] slack client class. This option is used only with hookUrl option.

Other available settings can be seen at Slack for PHP Official Docs


This work is based on the code by Hiroki Shimizu.