kagatan/monolog-telegram
Composer 安装命令:
composer require kagatan/monolog-telegram
包简介
A handler for Monolog that sends messages to Telegram Channels. Laravel
README 文档
README
🔔 Telegram Handler which allows you log messages to telegram channels using bots for Laravel
Installation
Install using composer:
composer require kagatan/monolog-telegram
Usage
Open up config/logging.php and find the channels key. Add the following channel to the list.
'channels' => [ 'stack' => [ 'driver' => 'stack', 'channels' => ['single', 'telegram'], ], .... 'telegram' => [ 'driver' => 'custom', 'via' => Kagatan\MonologTelegram\TelegramLogger::class,, 'token' => env('LOG_TELEGRAM_BOT_ID'), 'channel' => env('LOG_TELEGRAM_CHAT_ID') ], ]
Add the following information to your .env file. Your LOG_TELEGRAM_BOT_ID is for the your bot key and LOG_TELEGRAM_CHAT_ID is the chat ID for a telegram user or channel.
LOG_TELEGRAM_BOT_ID=123456789:ABCDEFGHIJKLMNOPQUSTUFWXYZabcdefghi LOG_TELEGRAM_CHAT_ID=12345678
统计信息
- 总下载量: 13.87k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-08-10