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

50 Commits

Author SHA1 Message Date
Jordi Boggiano
de87dad98f Fix CS 2020-05-21 17:02:48 +02:00
Gabriel Caruso
6038dcb21c JsonFormatter: add option to ignore empty context and extra fields
Similar to efe572cb10.
2020-05-15 13:45:36 +02:00
Jordi Boggiano
a8a0dbb778 Merge branch '1.x' 2019-12-20 14:53:43 +01:00
theravel
9621075c0f Fix JSON formatting of resource type, closes #1410 2019-12-20 14:49:27 +01:00
Jordi Boggiano
cf77550dca Make sure all exception codes are integers, fixes #1393 2019-11-12 20:38:27 +01:00
Jordi Boggiano
ae84612017 Merge branch '1.x' 2019-11-11 18:34:16 +01:00
Garrick Lam
b271cd4294 Don't even try to attempt normalizing iterators or generators in context
Iterators and Generators may not be rewindable, so foreach is not safe
to use on them.

Iterators and especially Generators may trigger irreversible actions on
calling next(), so iterating over all values can potentially cause harm,
e.g. imagine an iterator over a set of HTTP POST requests that are sent
when the next value is requested . The only sufficiently safe thing to
iterate and include here are primitive arrays.
2019-11-08 10:49:56 +08:00
Jordi Boggiano
57b286f3d1 Reuse normalizeException from NormalizerFormatter in JsonFormatter, fixes #1366 2019-08-30 10:40:17 +02:00
Jordi Boggiano
acf8e9e9a3 Merge branch '1.x' 2019-08-30 10:39:21 +02:00
Jordi Boggiano
2efcbcd181 Remove closure stack frames entirely from log 2019-08-30 10:24:17 +02:00
Jordi Boggiano
6688b45ebe Normalize the way backtraces are normalized and remove args for special cases, fixes #1346 2019-08-16 13:09:47 +02:00
George Mponos
c68b71edeb Add visibility to constants 2018-11-17 20:38:51 +02:00
Jordi Boggiano
073c5d763a Merge branch '1.x' 2018-11-04 18:40:32 +01:00
Jordi Boggiano
42d84e6a8d Move getClass method to a Utils class, refs #1190 2018-11-04 18:23:20 +01:00
Nicolas Grekas
9117a6c747 Fix displaying anonymous classes 2018-09-24 20:18:56 +02:00
Jordi Boggiano
06143b03e5 Add a bunch of return types and fix type inconsistencies reports from phan 2018-07-04 14:14:08 +02:00
Andrew Berry
0d993d84d1 Normalization of arrays containing self references (#1050)
Backport normalization fix from master to 1.x
2018-06-17 17:27:33 +02:00
Jordi Boggiano
c7b12a7497 Json formatter should always format context/extra as an object, fixes #1028 2018-06-09 17:02:23 +02:00
Jordi Boggiano
800fe2cc1a Migrate maxNormalizeDepth/maxNormalizeItemCount props and setters to NormalizerFormatter 2018-06-08 23:09:04 +02:00
Jordi Boggiano
518288c5c5 Merge branch '1.x' 2018-06-08 22:32:06 +02:00
Minh-Quan TRAN
ada5d30511 If context has exactly 1000 items, do not truncate 2018-06-08 22:18:08 +02:00
Tom Rochette
68cf3c69d1 Allow JsonFormatter maximum normalized depth and maximum number of items per level to be configured in the constructor. 2018-06-07 14:15:50 -04:00
Jordi Boggiano
2551b8e3eb Merge branch '1.x' 2017-06-18 23:46:31 +02:00
Lesnykh Ilia
6696e045df Update JsonFormatter.php 2017-05-03 15:37:25 +03:00
Jordi Boggiano
6e6586257d Add scalar types to processor/formatters and top level classes 2016-09-25 21:23:35 +02:00
Jordi Boggiano
ec945b60d4 Merge branch '1.x' 2016-09-18 18:10:42 +02:00
Nerijus Eimanavičius
6586425a31 Better support for PHP7 \Throwable 2016-08-28 00:47:02 +03:00
Jordi Boggiano
f16e67d523 CS fixes 2016-07-02 15:12:25 +01:00
Jordi Boggiano
f4567f1a5f Merge pull request #808 from naderman/fix/normalizer-recusion
Normalization of arrays containing self references
2016-07-02 15:34:40 +02:00
Nils Adermann
50232e7bb4 Introduce a depth parameter for normalization to limit stack nesting 2016-06-22 14:36:16 +02:00
Jordi Boggiano
21dde4dedb Move to strict mode and fix tests 2016-05-27 13:44:00 +01:00
Jordi Boggiano
f200e79879 CS fixes 2016-05-26 20:54:06 +01:00
Jordi Boggiano
6f26801be6 More type hints 2016-05-26 18:04:57 +01:00
Jordi Boggiano
5ecfbc25de Fix issue in handling of broken iterators when serializing stack frames, fixes #772 2016-05-20 19:39:35 +01:00
Jordi Boggiano
481fc4cfa1 PHP7 compat for exception classes, fixes #718 2016-03-01 16:20:06 +00:00
Javier Spagnoletti
e8e1d9efa3 Add ability to include exception's stack traces in Monolog\Formatter\JsonFormatter
| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |
2015-12-31 11:24:28 -03:00
Pascal Borreli
a2c6c37c8d Fixed typos 2015-03-05 01:11:15 +00:00
Jordi Boggiano
b738a6c04c CS fixes 2014-10-17 19:12:45 +01:00
Ala Eddine Khefifi
49f01b6ff6 Update JsonFormatter.php
It's more clear and proper this way to put all class constants on top.
2014-10-04 12:39:13 +01:00
Jordi Boggiano
5e8bb7556b Added $appendNewline flag to the JsonFormatter to enable using it when logging to files, fixes #344 2014-04-20 18:38:47 +02:00
Jordi Boggiano
392ef35fd4 CS fixes 2014-03-23 20:50:26 +01:00
Adam Pancutt
b748794bba Revert "Simplified formatBatchNewlines()"
This reverts commit 4f91d1c58f.
2014-01-21 18:21:50 +00:00
Adam Pancutt
4f91d1c58f Simplified formatBatchNewlines() 2014-01-21 17:03:50 +00:00
Adam Pancutt
95f0649b59 Replaced LogglyFormatter with option to change batch formatting in JsonFormatter 2014-01-21 11:39:58 +00:00
Jordi Boggiano
da33c84d07 CS fixes 2012-06-14 15:47:01 +02:00
Christophe Coevoet
7ebcc6420f Changed the FormatterInterface to return only the formatted message and added a batch formatting method 2011-05-07 00:55:59 +02:00
Christophe Coevoet
87332a3e4e Added phpdoc for all methods and added the typehint for the FormatterInterface 2011-04-06 00:50:18 +02:00
Jordi Boggiano
6c24217c56 Renamed message to record 2011-02-25 23:01:43 +01:00
Jordi Boggiano
811e6c79d6 Added docblocks and fixed a couple tests 2011-02-22 12:10:54 +01:00
Jordi Boggiano
3fa6e4b91f Major refactoring to follow the Logbook model 2011-02-20 20:53:11 +01:00