Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prinx/slack-log-php
Simply log to Slack
https://github.com/prinx/slack-log-php
Last synced: 15 days ago
JSON representation
Simply log to Slack
- Host: GitHub
- URL: https://github.com/prinx/slack-log-php
- Owner: prinx
- License: mit
- Created: 2021-04-22T13:49:08.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-08T07:15:27.000Z (almost 2 years ago)
- Last Synced: 2024-12-01T16:48:19.832Z (about 1 month ago)
- Language: PHP
- Size: 23.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple log-to-Slack util
## Installation
```shell
composer require prinx/slack-log
```## Usage
First create a Slack [incoming webhook](google.com?q=create+slack+incoming+webhook).
In your `.env` file, at the root of your project, configure the webhook.
```ini
SLACK_LOG_WEBHOOK=https://hooks...# Optional. True by default
SLACK_LOG_ENABLED=true
```Then in your code, log:
```php
// 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## License
[MIT](LICENSE)