1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-17 22:56:24 +02:00
Commit Graph

28 Commits

Author SHA1 Message Date
Jordi Boggiano
cdec3b52ad Merge branch '2.x' 2024-04-12 15:36:24 +02:00
Christian Flothmann
b0a861a9cc explicitly mark nullable parameters as nullable (#1874) 2024-04-12 09:48:58 +02:00
Chimit
5be54eaa1e Clarified instructions about chat ID for Telegram (#1840) 2023-10-27 14:07:05 +02:00
Nicolas Grekas
9546d94bdc Use @return $this where applicable (#1828) 2023-08-03 14:04:37 +02:00
Samson Endale
1fd8e8c2c7 Add TelegramBotHandler topics support (#1802) 2023-06-20 16:42:38 +02:00
Thomas Müller
616c675160 add some @throws in constructors (#1779) 2023-02-04 16:26:41 +01:00
Jordi Boggiano
6627c092d8 Add phpstan strict rules and deprecation rules, fix all related issues 2022-04-24 11:08:10 +02:00
Jordi Boggiano
0dac87975c Add property types to all properties where possible 2022-04-21 21:58:32 +02:00
Jordi Boggiano
7952a83e0c Move phpdoc to native types 2022-04-20 09:21:58 +02:00
Jordi Boggiano
2695fa86cd CI fixes 2022-04-19 22:16:53 +02:00
Jordi Boggiano
2d006a8472 Convert level/levelName to enums (#1656) 2022-04-19 21:49:03 +02:00
Jordi Boggiano
5eb9b8ed93 Code cleanups 2022-03-21 14:18:54 +01:00
Jordi Boggiano
22c8b19358 Add LogRecord class, drop PHP <8.1 2022-03-21 14:18:53 +01:00
Jordi Boggiano
b886d70a35 Fixes 2022-03-14 13:35:56 +01:00
Jordi Boggiano
c02d86ffb2 Include record message/context/extra data when throwing an exception because the log cannot be opened, fixes #1630 2022-03-14 13:34:54 +01:00
Eugene Ivanov
832660ec68 Handling the maximum length of a Telegram message (#1616)
* Handling the maximum length of a Telegram message

The maximum allowed length of a Telegram message - 4096 symbols (https://core.telegram.org/bots/api#message, 'text' field). 
Longer messages are not delivered.
Therefore, I implemented splitting too long message into several (with a 1 second delay between sending according to the documentation - https://core.telegram.org/bots/faq#my-bot-is-hitting-limits-how-do-i-avoid-this) as the default behavior. 
An additional option that you can enable by truncateLongMessage is to leave one message, but truncate it to the maximum length allowed.

* Changed handling of long messages (default - truncation, delay - optional)

* PSR-12 code formatting
2022-03-07 14:37:10 +01:00
Thomas Müller
d76d691acf add checks for required curl extension 2021-07-27 19:50:08 +02:00
Jordi Boggiano
19542ed8ef Normalize @inheritDoc tags, refs #1557 2021-07-08 15:23:09 +02:00
Jordi Boggiano
8b5278d8e1 Bump phpstan to level 8 2021-07-04 14:08:43 +02:00
Jordi Boggiano
4ef5da80ad Fix CS 2021-07-04 14:04:52 +02:00
Jordi Boggiano
13d40f953f More type fixes towards level 7 2021-07-04 14:04:52 +02:00
Jordi Boggiano
01d104aa78 Add Record/Level/LevelName type aliases and improve phpstan type coverage to level 6 2021-07-04 14:04:52 +02:00
Павел Гвоздь
1c9c3676e6 Added support for working with BufferHandler (#1481)
* Added support for working with BufferHandler

Added `handleBatch` method for TelegramBotHandler and fixed `write` method.

This is necessary to work with BufferHandler, OverflowHandler etc.
2020-12-10 09:51:46 +01:00
Valentin Udaltsov
c282728812 Update TelegramBotHandler.php
Parameters `$level` and `$bubble` are already passed to parent constructor, no need to set them again.

Also setting `$level` without `setLevel()` makes it incomparable as it is not converted to int via `Logger::toMonologLevel()`.
2020-07-27 12:50:54 +03:00
Pascal Sommer
7a801dd041 Telegram Handler: support additional API parameters (#1451) 2020-05-22 08:44:02 +02:00
vershinin_so
c79d81ec28 mb_* functions with BC 2019-07-08 11:05:19 +03:00
Alexandr Mazur
636ca43ddf Change curl_exec($ch) call to Curl\Util::execute($ch) call, according to pull request. 2019-07-05 19:24:39 +03:00
Alexandr Mazur
1284105074 Add telegram bot handler. 2019-07-05 19:15:10 +03:00