prinx/slack-log

简单地记录到 Slack

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

This package is auto-updated.

Last update: 2024-09-08 10:56:32 UTC


README

安装

composer require prinx/slack-log

使用

首先创建一个 Slack 接收 webhook

在项目根目录的 .env 文件中配置 webhook。

SLACK_LOG_WEBHOOK=https://hooks...

# Optional. True by default
SLACK_LOG_ENABLED=true

然后在您的代码中记录

// PHP
use Prinx\SlackLog;

SlackLog::debug('✔️ User logged in.');
SlackLog::info('...');
SlackLog::notice('...');
SlackLog::warning('...');
SlackLog::error('...');
SlackLog::critical('...');
SlackLog::alert('...');
SlackLog::emergency('...');

贡献

  • 收藏此仓库
  • 此仓库分支
  • 添加缺失的功能
  • 创建拉取请求
  • 享受荣耀

许可证

MIT