composer require prinx/slack-log
First create a Slack incoming webhook.
In your .env
file, at the root of your project, configure the webhook.
SLACK_LOG_WEBHOOK=https://hooks...
# Optional. True by default
SLACK_LOG_ENABLED=true
Then in your code, log:
// PHP
use Prinx\SlackLog;
SlackLog::debug('✔️ User logged in.');
SlackLog::info('...');
SlackLog::notice('...');
SlackLog::warning('...');
SlackLog::error('...');
SlackLog::critical('...');
SlackLog::alert('...');
SlackLog::emergency('...');
- Star this repo
- Fork this repo
- Add a missing feature
- Create a pull request
- Receive the glory