composer require unreal4u/monolog-telegram. Telegram Monolog handler added.
This commit is contained in:
parent
eb5aa80430
commit
ca62397cbb
|
@ -19,5 +19,9 @@ monolog:
|
||||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
||||||
max_files: 30
|
max_files: 30
|
||||||
level: debug
|
level: debug
|
||||||
|
telegram:
|
||||||
|
type: service
|
||||||
|
id: app.log.telegram_handler
|
||||||
|
action_level: error
|
||||||
console:
|
console:
|
||||||
type: console
|
type: console
|
||||||
|
|
|
@ -35,3 +35,5 @@ parameters:
|
||||||
# Telegram bot
|
# Telegram bot
|
||||||
telegram_token: "123456:some-token"
|
telegram_token: "123456:some-token"
|
||||||
telegram_max_connections: 2
|
telegram_max_connections: 2
|
||||||
|
# Telegram monolog handler
|
||||||
|
telegram_log_chat_id: ~
|
||||||
|
|
|
@ -29,7 +29,8 @@
|
||||||
"knplabs/knp-markdown-bundle": "^1.4",
|
"knplabs/knp-markdown-bundle": "^1.4",
|
||||||
"knplabs/knp-paginator-bundle": "^2.5",
|
"knplabs/knp-paginator-bundle": "^2.5",
|
||||||
"unreal4u/telegram-api": "^2.2",
|
"unreal4u/telegram-api": "^2.2",
|
||||||
"csa/guzzle-bundle": "^2.1"
|
"csa/guzzle-bundle": "^2.1",
|
||||||
|
"unreal4u/monolog-telegram": "^0.2.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"sensio/generator-bundle": "^3.0",
|
"sensio/generator-bundle": "^3.0",
|
||||||
|
|
53
composer.lock
generated
53
composer.lock
generated
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "9b374e1b2cb413fbab3f0633d6f81c1a",
|
"content-hash": "88274224cc9dfe36d847acf69d5924d8",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "csa/guzzle-bundle",
|
"name": "csa/guzzle-bundle",
|
||||||
|
@ -3181,6 +3181,57 @@
|
||||||
],
|
],
|
||||||
"time": "2017-01-11T19:39:01+00:00"
|
"time": "2017-01-11T19:39:01+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "unreal4u/monolog-telegram",
|
||||||
|
"version": "v0.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/unreal4u/monolog-telegram.git",
|
||||||
|
"reference": "13c34ac16e9dad06e632ca8ed8aeee2d44663e5c"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/unreal4u/monolog-telegram/zipball/13c34ac16e9dad06e632ca8ed8aeee2d44663e5c",
|
||||||
|
"reference": "13c34ac16e9dad06e632ca8ed8aeee2d44663e5c",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"monolog/monolog": "~1.17",
|
||||||
|
"php": ">=7.0.0",
|
||||||
|
"unreal4u/telegram-api": "~2.1"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpmd/phpmd": "@stable",
|
||||||
|
"phpunit/phpunit": "@stable",
|
||||||
|
"squizlabs/php_codesniffer": "@stable"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"unreal4u\\": "src/unreal4u"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Camilo Sperberg",
|
||||||
|
"email": "me@unreal4u.com",
|
||||||
|
"homepage": "https://github.com/unreal4u/monolog-telegram/graphs/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Monolog handler to enable sending messages through Telegram",
|
||||||
|
"keywords": [
|
||||||
|
"api",
|
||||||
|
"monolog",
|
||||||
|
"monolog handler",
|
||||||
|
"telegram",
|
||||||
|
"telegram bot"
|
||||||
|
],
|
||||||
|
"time": "2016-12-14T00:25:05+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "unreal4u/telegram-api",
|
"name": "unreal4u/telegram-api",
|
||||||
"version": "v2.3.0",
|
"version": "v2.3.0",
|
||||||
|
|
|
@ -186,15 +186,28 @@ services:
|
||||||
|
|
||||||
|
|
||||||
# Telegram services
|
# Telegram services
|
||||||
# API client
|
# Bot API client
|
||||||
app.telegram.api_client:
|
app.telegram.bot_client:
|
||||||
class: unreal4u\TelegramAPI\TgLog
|
class: unreal4u\TelegramAPI\TgLog
|
||||||
arguments: ['%telegram_token%', '@logger', '@app.http.telegram_client']
|
arguments: ['%telegram_token%', '@logger', '@app.http.telegram_client']
|
||||||
|
|
||||||
|
# Logger API client
|
||||||
|
app.telegram.logger_client:
|
||||||
|
class: unreal4u\TelegramAPI\TgLog
|
||||||
|
arguments: ['%telegram_token%', null, '@app.http.telegram_client']
|
||||||
|
|
||||||
|
# Monolog handler
|
||||||
|
app.log.telegram_handler:
|
||||||
|
class: unreal4u\MonologHandler
|
||||||
|
arguments:
|
||||||
|
- '@app.telegram.logger_client'
|
||||||
|
- '%telegram_log_chat_id%'
|
||||||
|
- 'error'
|
||||||
|
|
||||||
# Message sender
|
# Message sender
|
||||||
app.telegram.message_sender:
|
app.telegram.message_sender:
|
||||||
class: Skobkin\Bundle\PointToolsBundle\Service\Telegram\MessageSender
|
class: Skobkin\Bundle\PointToolsBundle\Service\Telegram\MessageSender
|
||||||
arguments: ['@app.telegram.api_client', '@twig']
|
arguments: ['@app.telegram.bot_client', '@twig']
|
||||||
|
|
||||||
# User notifier
|
# User notifier
|
||||||
app.telegram.notifier:
|
app.telegram.notifier:
|
||||||
|
@ -212,7 +225,7 @@ services:
|
||||||
app.telegram.inline_query_processor:
|
app.telegram.inline_query_processor:
|
||||||
class: Skobkin\Bundle\PointToolsBundle\Service\Telegram\InlineQueryProcessor
|
class: Skobkin\Bundle\PointToolsBundle\Service\Telegram\InlineQueryProcessor
|
||||||
lazy: true
|
lazy: true
|
||||||
arguments: ['@app.point.user_repository', '@app.telegram.api_client']
|
arguments: ['@app.point.user_repository', '@app.telegram.bot_client']
|
||||||
|
|
||||||
# Private message processor
|
# Private message processor
|
||||||
app.telegram.private_message_processor:
|
app.telegram.private_message_processor:
|
||||||
|
|
Loading…
Reference in a new issue