GithubHelp home page GithubHelp logo

jeffersonsimaogoncalves / cakephp-slack-log-engine Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hiromi2424/cakephp-slack-log-engine

2.0 2.0 0.0 12 KB

CakePHP log engine for slack

License: MIT License

PHP 100.00%

cakephp-slack-log-engine's Introduction

What is this?

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.

Installation

composer require jeffersonsimaogoncalves/cakephp-slack-log-engine

Requirements

  • PHP 7
  • CakePHP 3.x

Usage

Configure log

In your app.php, you can configure like:

'Log' => [
    'error' => [
        'className' => 'SlackLogEngine\Log\Engine\SlackLogEngine',
        // Your slack hook URL here
        'hookUrl' => 'https://hooks.slack.com/services/xxxxx/xxxxx/xxxxxxxxxx',
        // 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

Credits

This work is based on the code by Hiroki Shimizu.

cakephp-slack-log-engine's People

Contributors

hiromi2424 avatar jeffersonsimaogoncalves avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.