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

549 Commits

Author SHA1 Message Date
Jean-Baptiste Nahan
50241e6ced Update AmqpHandlerTest.php 2016-03-13 16:05:23 +00:00
Jordi Boggiano
81045d5974 Fix tests 2016-03-09 11:43:02 +00:00
Jordi Boggiano
25131bb5f6 Add context.* replacement in line formatter, fixes #717 2016-03-01 16:58:06 +00:00
Alexey Karapetov
c688ff17eb HandlerWrapper 2016-03-01 15:59:22 +00:00
Jordi Boggiano
dad186036c Merge pull request #711 from phansys/json_formatter_normalizer
Add ability to include exception's stack traces in `Monolog\Formatter\JsonFormatter`
2016-03-01 15:48:15 +00:00
Jordi Boggiano
6079ae8bfb Merge remote-tracking branch 'origin/1.0' into 1.x 2016-03-01 15:40:28 +00:00
Jordi Boggiano
cb2778ae77 Add ->withName to clone a handler and get a new name, fixes #730 2016-02-13 16:47:31 +00:00
Grégoire Paris
f1a59c5e0f add release number to every log
This adds an internal release number to the raven handler. The release
number is added to what is sent to sentry unless something already is
present because a release number was sent via "context" or "extra".
2016-01-23 23:00:37 +01:00
Dmitriy Garanzha
e2a77060da Raven client fingerprint support 2016-01-20 11:39:44 +02: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
Jordi Boggiano
cab3ff71ff Add regression test for #691 and optimize implementation using a single pass loop over the handlers, refs #692 2015-11-26 23:48:42 +00:00
Sam Reed
e5bb0bf98a Remove excess parameter from createHandler
It only takes 3 parameters
2015-11-20 14:43:25 +00:00
Jordi Boggiano
0178fd4f09 CS fixes, refs #683 2015-11-18 17:53:15 +00:00
Jordi Boggiano
9532e979b6 Merge remote-tracking branch 'bd808/feature/clean-json' 2015-11-18 17:50:41 +00:00
Jordi Boggiano
0880801b4a Merge pull request #686 from apfelbox/hipchat-from
[HipChatHandler] Always send the "from" name
2015-11-18 17:12:52 +00:00
Jordi Boggiano
665453d06a Use json_encode for the whole message formatting, refs #686 2015-11-18 17:11:02 +00:00
Jordi Boggiano
c889fb2648 CS fixes & upgrading cs fixer config 2015-11-18 17:09:46 +00:00
Jordi Boggiano
75ca9e5dc7 Merge remote-tracking branch 'fordnox/master' 2015-11-18 17:01:29 +00:00
Jannik Zschiesche
538349c4c4 Fixed HipChat tests 2015-11-18 10:25:09 +01:00
fordnox
034e895a6d Do not include message levels if it is already included in tag 2015-11-15 21:23:25 +02:00
fordnox
a5552dd34d Add fluentd formatter. 2015-11-15 20:39:30 +02:00
Bryan Davis
6f9e221bd6 Attempt to recover from json encoding errors
Detect and attempt to recover from json_encode errors triggered by
strings containing invalid UTF-8 sequences. Recovery will only be
attempted when encoding strings or arrays. If recovery fails then
a RuntimeException will be thrown.

The recovery process will convert invalid UTF-8 codepoints as though the
input string was encoded using the ISO-8859-15 character encoding. This
conversion may result in incorrect string output if the original
encoding was not ISO-8859-15, but it will be a valid UTF-8 string.

Closes #545
2015-11-12 10:59:27 -07:00
Elan Ruusamäe
2e03107b56 add tests for NativeMailerHandler 2015-11-09 19:26:58 +02:00
Jordi Boggiano
35932023f1 Merge pull request #674 from xapon/tostring-error
#673 Fix fatal error while normalizing with __toString method
2015-10-29 19:03:56 +00:00
Jordi Boggiano
6b42e7d241 Merge pull request #668 from silvadanilo/avoid_infinite_loop
Avoid infinite loops when no data is written on a socket for a time
2015-10-28 15:18:16 +00:00
Bryan Davis
4e69837afc Optionally reduce timestamp resolution for performance
Introduce a new `useMicrosecondTimestamps()` method to Logger that
allows runtime selection of whether or not to create microsecond
resolution timestamps for log records.

Generating microsecond resolution timestamps by calling
`microtime(true)`, formatting the result via `sprintf()` and then
parsing the resulting string via `DateTime::createFromFormat` can incur
a measurable runtime overhead vs simple usage of `new DateTime` to
capture a second resolution timestamp in systems which generate a large
number of log events.

The default behavior of generating high precision timestamps remains the
same, but may be changed in a future release. Users requiring high
precision timestamps are encouraged to explicitly call
`Monolog\Logger::useMicrosecondTimestamps(true)` in their setup code.

Closes #657
2015-10-25 15:13:43 -06:00
Anton Sergeyev
f19d9ce9a1 #673 Fix fatal error while normalizing with __toString method which may throw an exception 2015-10-25 22:44:00 +06:00
Danilo Silva
6f19ba38ad added a test on writingTimeout setter and getter methods 2015-10-19 12:21:41 +02:00
Danilo Silva
5c129a7f7f Avoid infinite loops when no data is written on a socket for a time greater than writingTimeout settings 2015-10-19 12:02:32 +02:00
Jordi Boggiano
80c4bfb9fd Restore filtering behavior, refs #663 2015-10-14 14:12:50 +01:00
Jordi Boggiano
5405308eb1 Fix raven tests 2015-10-09 18:21:34 +01:00
François-Xavier de Guillebon
f24867ad06 Fixed undeclared properties 2015-09-17 14:33:27 +02:00
Aleksei Shmelev
aaa2854b10 SwiftMailerHandler bugfix.
Added generating unique id when building message and test.
2015-09-14 16:37:30 +03:00
jeroendedauw
e915a18c73 Remove not needed FQNs 2015-09-03 19:10:55 +02:00
Jordi Boggiano
5785a9ac4a Fix CS and php5.3 compat 2015-08-31 10:26:07 +01:00
Jordi Boggiano
841ecbe7f3 Merge pull request #634 from henriquemoody/resource_type
Better normalization for resources
2015-08-30 12:24:10 +01:00
Jared Markell
3a3d28f91a Add getUid() to UidProcessor 2015-08-24 14:50:30 -07:00
Henrique Moody
50fb249739 Better normalization for resources 2015-08-20 15:01:24 -03:00
Tomasz Wójcik
762361fff9 RavenHandler supports extra parameters 2015-08-16 11:13:32 +02:00
Tomasz Wójcik
4551b8c63b RavenHandler handles custom checksums 2015-08-15 17:58:48 +02:00
Jordi Boggiano
419ca7ac25 Tweak patch a bit, refs #617 2015-08-09 18:28:21 +01:00
Jordi Boggiano
eabe95f9f0 Merge remote-tracking branch 'sminnee/logger-sethandlers' 2015-08-09 18:24:59 +01:00
Jordi Boggiano
3dccef613e Make sure handlers can be closed multiple times 2015-08-09 17:29:31 +01:00
Sam Minnee
60c96cfa2a Added Logger::setHandlers()
Logger::setHandlers() is intended to help dependency injection systems
that deal more elegantly with property setters than constructor
arguments. Alongside getHandlers(), pushHandler(), popHandler(), it is
a logical addition to the API.

It also attempts to address some possible errors in the format of the
data passed:

 - If a map is passed, the keys are removed, as these aren’t expected
   by Monolog
 - If falsey values are included, these are stripped

It relies on Logger::pushHandler() internally, so that if any special
behaviour is added in the future, this only needs to be added in one
place.
2015-07-28 13:15:02 +12:00
Kevin M Granger
a8ab53fdd2 Add more unit tests for Registry
Coverage should now be 100%
2015-07-17 11:46:18 -07:00
Jordi Boggiano
ca1376bd61 CS fixes 2015-07-14 10:26:05 +01:00
Jordi Boggiano
cf6fa57dd4 Merge pull request #602 from ninjapenguin/add-redis-apped-collection
Adds ability to cap log size in redis
2015-07-14 09:02:00 +01:00
Matt Wells
12711d133a Switch back to using rpush
Switches back to rpush to keep list order consistent with non capped
collections
2015-07-13 19:40:51 +01:00
Jordi Boggiano
328d66f13f Fix support for associative tag arrays, refs #588 2015-07-13 11:06:01 +01:00
Matt Wells
4d59281868 Fixes 5.3 compatibility in test cases 2015-07-12 19:21:53 +01:00