Looking to hire Laravel developers? Try LaraJobs

laravel-logslack maintained by maras0830

Description
Send logs to slack channel.
Author
Last update
2022/06/09 04:22 (dev-master)
Links
Downloads
4 478

Comments
comments powered by Disqus

Laravel Log to Slack Channel

via incoming callback - https://api.slack.com/incoming-webhooks

2018-09-03 5 22 26

Installation

$ composer require maras0830/laravel-LogSlack

in config/app.php

    'providers' => [
    	...
        Maras0830\LogSlack\Providers\LogSlackBotServiceProvider::class,
    ];		

.env

SLACK_LOG_LEVEL=success,warning,error
SLACK_LOG_CALLBACK_URL=<slack_incoming_callback_url>

if your laravel version >= 5.8, install laravel/slack-notification-channel

$ composer require laravel/slack-notification-channel

Example

in route/web.php


Route::get('slack', function() {

    Log::debug('Slack Log ', ['Slack' => 'Hello']);
});

call http://localhost/slack