prinx/slack-log

Simply log to Slack

v2.0.0 2023-01-08 07:13 UTC

This package is auto-updated.

Last update: 2024-12-08 11:26:44 UTC


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

License

MIT