1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-31 08:45:35 +02:00

859 Commits

Author SHA1 Message Date
Cosmin Ardeleanu
b0f4bf7eb7 Fix LogRecord "extra" data leaking between handlers (#1819)
Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
2023-10-27 16:54:39 +02:00
Jordi Boggiano
8ff4ab5c94 Add ability to indent stack traces in LineFormatter, fixes #1835 2023-10-27 16:19:09 +02:00
Jordi Boggiano
5d317e2c6f Fix tests usage 2023-10-27 16:09:14 +02:00
Philipp Müller
1feb860c33 Added possibility to set max length for level name in LineFormatter
Closes #1850
2023-10-27 16:07:36 +02:00
Jordi Boggiano
70f6ca05b9 Merge branch '2.x' 2023-10-27 15:26:39 +02:00
Grégoire Pineau
f54263935d Skip mongodb extension if extension is not installed (#1825) 2023-10-27 14:50:45 +02:00
dong
8813064010 Let indexed arrays to support inline linebreaks in LineFormatter (#1818) 2023-10-27 14:31:42 +02:00
Egor Korobov
ed80d53ab2 Fix fatal error in NormalizeFormatter: method_exists(): The script tried to execute a method or access a property of an incomplete object.
Closes #1833
Fixes #1834
2023-10-27 14:05:53 +02:00
Christophe Coevoet
e545d0f444 Add a WithMonologChannel attribute (#1847)
This attribute is meant to be used by frameworks / integrations to
choose which logger instance to inject in a class when they manage
several channels, if they decide to use it.
This attribute will have no effect in Monolog itself as the wiring of
the logger in other classes is not managed by Monolog.
2023-10-25 15:02:25 +02:00
Samson Endale
1fd8e8c2c7 Add TelegramBotHandler topics support (#1802) 2023-06-20 16:42:38 +02:00
Roy
4356885fbb Add support for priority in the Monolog bundle (https://github.com/symfony/monolog-bundle/pull/455) (#1797)
Co-authored-by: Roy <rdmartines@vcn.nl>
2023-06-20 16:37:16 +02:00
Johan Vlaar
dc4bc7e660 Add LoadAverageProcessor (#1803)
Co-authored-by: johan Vlaar <johan@adivare.nl>
Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
2023-06-20 16:13:13 +02:00
chris
8561130215 Upgrade to phpunit 10 (#1806)
Co-authored-by: Christopher Georg <christopher.georg@sr-travel.de>
2023-06-20 15:56:11 +02:00
Pitchaya Boonsarngsuk
06276fcf77 FingersCrossedHandler fix passthruLevel checking (Fixes #1800) (#1801) 2023-06-20 14:19:37 +02:00
Jordi Boggiano
9b5daeaffc Merge branch '2.x' 2023-02-06 14:46:10 +01:00
Jordi Boggiano
c8b1e0e789 Fix serialization implementation 2023-02-06 14:43:38 +01:00
Jordi Boggiano
2ae044482c Fix serializability of Logger class, fixes #1792 2023-02-06 14:33:41 +01:00
Identei
f58e4f47b3 Add an option to set the op_type for the ElasticsearchHandler (#1766)
Co-authored-by: Identei <>
2023-02-04 21:40:17 +01:00
Jordi Boggiano
c424dbc6a5 Merge branch '2.x' 2023-02-04 16:24:57 +01:00
Niklas Keller
0f014206a4 Fix cycle detection within fibers (#1753)
* Fix cycle detection within fibers

We keep a separate depth count per fiber.

Fixes #1752.

* Avoid additional call to Fiber::getCurrent()

Suppresses phpstan errors, as they're false positives.
2023-02-04 15:49:17 +01:00
Luís Cobucci
69bd3637ba Fix date/time field for GCP logging (#1759)
We introduced the formatter using the incorrect field, which was making
GCP not to extract the correct value from the payload.

This uses the field that actually maps to the expected format.

More info: https://cloud.google.com/logging/docs/structured-logging
2023-02-04 15:39:20 +01:00
Luís Cobucci
e937256eee Fix date/time field for GCP logging (#1758)
We introduced the formatter using the incorrect field, which was making GCP not to extract the correct value from the payload.

This uses the field that actually maps to the expected format.

More info: https://cloud.google.com/logging/docs/structured-logging
2023-02-04 15:38:57 +01:00
Sergey Rabochiy
e18aa33d2f Add ClosureContextProcessor (#1745)
Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
2023-02-04 15:24:39 +01:00
Jordi Boggiano
6a28e9d41a Use facility additional value and not channel to be compat with existing Monolog 3 code 2022-08-20 15:05:05 +02:00
Jordi Boggiano
5eccd17dc5 Add graylog2/gelf-php 2.x support, fixes #1747 2022-08-20 14:09:11 +02:00
Grégoire Pineau
5df3238664 Fix bug with level in GitProcessor (#1749) 2022-08-17 23:30:28 +02:00
Jordi Boggiano
8471abd5ef Merge branch '2.x' 2022-08-02 15:04:49 +03:00
Jordi Boggiano
132eace138 Fix build 2022-08-02 15:03:47 +03:00
Jordi Boggiano
60d9aab60e Fix tests 2022-07-22 20:55:12 +02:00
Jordi Boggiano
4e131c13ac Merge branch '2.x' 2022-07-22 20:49:57 +02:00
Jordi Boggiano
4b4fad9476 Fix serialization to include private properties, fixes #1727, fixes phpro/grumphp#1020 2022-07-22 20:49:07 +02:00
Jordi Boggiano
f7dfa00f08 Add Level::toRFC5424Level method and restore BC to Syslog handlers (broken in #1689) 2022-07-22 17:04:34 +02:00
Jordi Boggiano
7d31b642bd Merge branch '2.x' 2022-07-22 16:50:53 +02:00
Lusso Luca
ffd505543c Add RFC 5424 level (7 to 0) support to Logger::log and Logger::addRecord, fixes #1686 (#1723)
Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
2022-07-22 16:46:43 +02:00
picass0
a7e5beda57 finishing Syslog formatter (#1689)
* feat: Syslog formatter

* feat: Syslog formatter, app name

* update syslogFormatter

* Remove legacy syntax

Co-authored-by: Dalibor Karlović <dalibor.karlovic@sigwin.hr>
Co-authored-by: Renat Gabdullin <renatobyj@gmail.com>
2022-07-22 16:17:53 +02:00
Pavel Bychko
320909a1d1 Fix replaceNewlines method to avoid replacing escaped backslashes, closes #1721, fixes #1720 2022-07-22 16:05:32 +02:00
Jordi Boggiano
7684fae8fa Merge branch '2.x' 2022-07-22 15:51:15 +02:00
Jordi Boggiano
cf0f4b3814 Handle __toString to serialize objects which are not json-serializable in JsonFormatter, fixes #1733 2022-07-22 15:27:46 +02:00
Jordi Boggiano
34635fdcf5 Add docs 2022-07-22 15:08:12 +02:00
Jordi Boggiano
6fdeea463c Fix build 2022-07-22 15:07:44 +02:00
erikn69
27dc1b2ef7 Fix utf8_encode deprecation (#1722) 2022-07-22 14:23:53 +02:00
Luís Cobucci
197f534d42 Add basic support to Google Cloud Logging format (#1719)
Google Cloud Logging doesn't show the correct level log when using
JsonFormatter, making observability a bit trickier. This applies minor
tweaks to the default format, allowing log entries to be properly
represented.

There are alternative packages to this but they add fields that aren't
strictly required - also performing `debug_backtrace()` calls that are
usually not desired when in production mode.

This is a backport of https://github.com/Seldaek/monolog/pull/1690

Signed-off-by: Luís Cobucci <lcobucci@gmail.com>
2022-07-22 13:04:51 +02:00
Luís Cobucci
1ae4f609ba Add basic support to Google Cloud Logging format (#1690)
Google Cloud Logging doesn't show the correct level log when using
JsonFormatter, making observability a bit trickier. This applies minor
tweaks to the default format, allowing log entries to be properly
represented.

There are alternative packages to this but they add fields that aren't
strictly required - also performing `debug_backtrace()` calls that are
usually not desired when in production mode.

Signed-off-by: Luís Cobucci <lcobucci@gmail.com>
2022-07-22 13:03:58 +02:00
Jordi Boggiano
0ddba7342f Merge branch '2.x' into main 2022-06-09 11:04:38 +02:00
henning
24e414c993 Added $datetime parameter to addRecord method to optionally log into the past/future 2022-06-09 10:49:31 +02:00
Gene Alyson Fortunado Torcende
8ac56aa42b RotatingFileHandler to maintain the correct maximum number files when using folder by date (#1671) 2022-06-09 10:41:11 +02:00
Jordi Boggiano
b3451b008b Merge branch '2.x' into main 2022-05-10 11:53:02 +02:00
Jordi Boggiano
1dacc790b9 Remove LevelName enum in favor of a Level::getName method, fixes #1667 (#1668) 2022-05-10 11:15:16 +02:00
Jordi Boggiano
a5d65f6ec4 Fix infinite loops when a log handler triggers logging itself 2022-05-10 11:10:07 +02:00
Jordi Boggiano
5d43fd52d3 Allow UdpSocket to reconnect after close() 2022-05-10 10:29:15 +02:00