1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-07-29 09:20:12 +02:00

33 Commits

Author SHA1 Message Date
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
Jordi Boggiano
9b5deda678 Merge pull request #1290 from versh23/fix-gelp-formtatter
use mb_ functions everywhere if possible
2019-08-30 11:20:47 +02:00
Mario Blažek
d317cb97d3 Move expectException before the line where exception is thrown 2019-08-13 15:34:48 +02:00
Mario Blažek
37900f9268 Upgrade PHPUnit to v8 2019-08-12 15:20:00 +02:00
vershinin_so
ada57dd4a1 use mb_ functions in GelfFormatter 2019-07-08 10:30:25 +03:00
Jordi Boggiano
41b8f5ebf4 CS fixes 2018-06-18 18:53:46 +02:00
Jordi Boggiano
ca4ffa68f6 Use namespaced phpunit classes, fixes #983 2017-06-19 00:48:54 +02:00
Jordi Boggiano
5e8bb7dfbe Make sure this works on any hostname 2017-06-19 00:42:25 +02:00
Jordi Boggiano
2551b8e3eb Merge branch '1.x' 2017-06-18 23:46:31 +02:00
Enleur
faed450d52 Use GELF max length per field and make max length configurable in constructor 2017-04-07 13:49:54 +03:00
Remon van de Kamp
23c9842285 Remove remaining artifacts from mlehner/gelf-php (#896) 2016-12-13 15:34:52 +01: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
e27225dc40 Switch to DateTimeImmutable everywhere 2016-05-20 20:55:31 +01:00
Christian Flothmann
b437bb928a fix Gelf message formatter tests
Version 1.4.1 is the last version compatible with PHP < 5.3.9, but
filtered all message attributes with zero string length.
2016-04-05 15:51:16 +02:00
Jordi Boggiano
6bc1a444db Truncate messages if they reach the max length of GELF messages, fixes #751 2016-04-02 13:53:47 +01:00
Jordi Boggiano
c889fb2648 CS fixes & upgrading cs fixer config 2015-11-18 17:09:46 +00:00
Jordi Boggiano
5cd99de56d Accept incomplete records in GelfMessageFormatter, closes #482 2015-03-01 13:59:22 +00:00
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
2d192b0567 Skip test in hhvm 2014-12-16 11:04:16 +00:00
Jordi Boggiano
d7561931a5 Attempt to fix hhvm build 2014-12-16 10:34:35 +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
b738a6c04c CS fixes 2014-10-17 19:12:45 +01:00
Jordi Boggiano
392ef35fd4 CS fixes 2014-03-23 20:50:26 +01:00
Benjamin Zikarsky
f0ed3d8054 Allow for both mlehner/gelf-php and graylog2/gelf-php usage 2014-02-22 16:11:33 +01:00
Benjamin Zikarsky
c8289fd654 Updated GelfHandler/GelfFormatter
Changes monolog to use the updated official graylog2/gelf-php
2013-12-28 18:57:39 +01:00
Jordi Boggiano
0f3c054dff Fix tests for 5.3 2013-10-28 10:41:17 +01:00
Tarjei Huse
b78d997638 Add logging of exception line and file path to gelf message 2013-10-27 08:29:08 +01:00
Jordi Boggiano
47eb599b4a Update tests and changelog 2013-01-11 11:23:20 +01:00
Marc Abramowitz
fd4d2556f6 Refactor GelfMessageFormatterTest and GelfHandlerTest so that they don't
fatal error when mlehner/gelf-php is not installed.

Fixes GH-78.
2012-04-26 15:37:21 -07:00
Matt Lehner
d95889a98d code cleanups as suggested by @stof 2012-04-20 13:25:38 -04:00
Matt Lehner
979c4655f9 created GelfMessageFormatter and related tests 2012-04-17 16:17:43 -04:00