matviib / telegram-logger
Put log messages from your Laravel app to your Telegram bot
v1.0.1
2018-03-26 20:16 UTC
Requires
- laravel/framework: ^5.0
This package is auto-updated.
Last update: 2024-11-08 06:35:51 UTC
README
Logging your application problems(achievements) to Telegram
Ultralight package
Usage
\Log::telegram('Hey, i am your application, and i have a problem');
Instalation
composer require matviib/telegram-logger
Add to your .env file:
TELEGRAM_LOGGER_TOKEN=<YOUR_BOT_TOKEN>
TELEGRAM_LOGGER_CHAT_ID=XXX,YYY
#developer1 - XXX
#developer2 - YYY
Bonus
Creating telegram bot tutorial
- Find BotFather.
- Send
/newbot
. - Set up name and bot-name for your bot.
- Get token and add it to your .env file.
- Find your bot (BotFather already generate link to it in last message).
- Send one or few messages to him.
- Open next url
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates
and findchat_id
.
Steps #6,#7 needed for adding EACH developer to listeners of the bot.