underwear / laravel-myteam-logging
Send logs to MyTeam chat via MyTeam bot
v1.1
2020-07-21 13:22 UTC
Requires
- php: ^7.1.3
- laravel/framework: 5.6.*|5.7.*|5.8.*|^6.0|^7.0
- monolog/monolog: ^1.23|^2.0
This package is auto-updated.
Last update: 2024-12-30 02:10:45 UTC
README
Send logs to Myteam chat via Myteam bot
Install
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"
Create bot
For using this package you need to create Myteam bot
See the official docs Myteam BOT API Docs
Credits
- Igor Filippov (maintainer)
- Kamil Mukhametzyanov (used his telegram logger as foundation)