maras0830/laravel-logslack

There is no license information available for the latest version (v1.0.11) of this package.

Send logs to slack channel.

v1.0.11 2022-06-09 02:22 UTC

This package is auto-updated.

Last update: 2024-05-09 06:27:19 UTC


README

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

2018-09-03 5 23 16