Send logs to Myteam chat via Myteam bot
composer require underwear/laravel-myteam-logging
Define Myteam Bot Token and chat id (users myteam id) and set as environment parameters. Add to .env
MYTEAM_LOGGER_BOT_TOKEN=id:token
MYTEAM_LOGGER_CHAT_ID=chat_id
MYTEAM_LOGGER_API_HOST=https://myteam.mail.ru/
Add to config/logging.php file new channel:
'myteam' => [
'driver' => 'custom',
'via' => MyteamLogger\MyteamLogger::class,
'level' => 'debug',
]
If your default log channel is a stack, you can add it to the stack channel like this
'stack' => [
'driver' => 'stack',
'channels' => ['single', 'myteam'],
]
Or you can simply change the default log channel in the .env
LOG_CHANNEL=myteam
Publish config file
php artisan vendor:publish --provider "MyteamLogger\MyteamLoggerServiceProvider"
For using this package you need to create Myteam bot
See the official docs Myteam BOT API Docs
- Igor Filippov (maintainer)
- Kamil Mukhametzyanov (used his telegram logger as foundation)