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

12 Commits

Author SHA1 Message Date
Thomas Ploch
dca8f5841f Normalize frames for trace items since they can contain invalid data.
Refs https://github.com/Seldaek/monolog/pull/474/files

The fix in the previous PR did not take into account that there might be object wrapped resources that would break json_encode, so the best solution would be normalizing those frames again.

@Seldaek Sorry for the inconvenience, but our graylog is still ramming up with those json_encode error messages.
2014-12-16 13:26:24 +01:00
Jordi Boggiano
7db9d6ef4a Remove reference use, refs #474 2014-12-16 10:23:16 +00:00
Thomas Ploch
00bfec630a Recursively check for resource arguments if trace is coming from internal function.
With `React` or `Guzzle`, that register stream wrappers with PHP, the traces are treated as coming from internal functions with no line and file inside the frame. But they almost always contain resources as arguments, on which the `json_encode()` call will choke (probably this should be addressed in json_encode internally, since it is very easy to cast a resource to a string).

I added a test case proving the situation and a pretty basic recursive checker for resources which just casts them as a string into the frame again.
2014-12-16 10:13:12 +01:00
Jordi Boggiano
0951050a1e Check for json dependency, fixes #378 2014-06-20 16:09:34 +02:00
Gábor Tóth
3a811ecfda fix normalizing exception trace
The trace does not include the file / line at which the exception is thrown
2014-02-06 12:46:03 +01:00
Jordi Boggiano
a43f926ffe Abort normalization of traversables after 1000 items have been discovered, fixes #201 2013-06-07 10:26:36 +02:00
Jordi Boggiano
aa518ad791 Add stack traces to normalized exceptions, closes #192 2013-05-21 21:05:40 +02:00
Jordi Boggiano
63e3bfdf7e Resolve json encoding errors issue globally, refs #137 2013-01-06 20:14:14 +01:00
Jordi Boggiano
4829b09743 Avoid failures when normalizing exotic values, fixes #89 2012-06-15 16:45:26 +02:00
Jordi Boggiano
da33c84d07 CS fixes 2012-06-14 15:47:01 +02:00
Jordi Boggiano
56d246cca3 Make gelf formatter extend the normalizer one 2012-04-22 17:38:31 +02:00
Jordi Boggiano
0bd4d93006 Split off line formatter in normalizer + line formatters 2012-04-22 12:36:23 +02:00