prinx / slack-log
Simply log to Slack
v2.0.0
2023-01-08 07:13 UTC
Requires
- prinx/dotenv: ^1.0
- symfony/http-client: ^6.0
Requires (Dev)
- nunomaduro/collision: ^6.1
- phpunit/phpunit: ^9.5
README
Installation
composer require prinx/slack-log
Usage
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('...');
Contribute
- Star this repo
- Fork this repo
- Add a missing feature
- Create a pull request
- Receive the glory