Jordi Boggiano
24dafdeb8e
Merge pull request #1117 from RGustBardon/rgb/signal-handler
...
Register signal handlers
2018-11-04 18:28:17 +01:00
Grégoire Pineau
0625068bf0
Added a new ResettableInterface and implemented it where possible.
...
When one use Monolog in a long process like an AMQP worker with a
`FingersCrossedHandler` or `BufferHandler` there is a drawback: as soon as there
is an AMQP message that generate a log >= error (for example), all next AMQP
messages will output logs, even if theses messages don't generate log where
level >= error.
In the same context there is a drawback for processor that add an UUID to the
logs. The UUID should change for each AMQP messages.
---
This patch address this issue with a new interface: `ResettableInterface` interface.
Side note: `reset()`, `flush()`, `clear()`, are already used in Monolog. So
basically, one can use the `reset()` on the `Logger` and on some
`Handler`s / `Processor`s.
It's especially useful for
* the `FingersCrossedHandler`: it `close()` the buffer, then it `clear()` the buffer.
* the `BufferHandler`: it `flush()` the buffer, then it `clear()` the buffer.
* the `UidProcessor`: it renew the `uid`.
2018-07-06 16:07:13 +02:00
Robert Gust-Bardon
37b587687d
Move POSIX signal handling to SignalHandler*
...
Suggested by Helmut Hummel (@helhum).
2018-07-01 23:42:41 -05:00
Robert Gust-Bardon
23fd84fec0
Wait for children that are being tested
2018-06-18 11:25:41 -05:00
Robert Gust-Bardon
25c427a0e4
Add a missing @dataProvider
2018-06-18 11:17:10 -05:00
Jordi Boggiano
3e92b08956
Avoid information leaks through call_user_func arguments, fixes #1138
2018-06-18 17:21:54 +02:00
Petter Blomberg
f753c68a73
Make context optional in hasRecord to not break backwards compatibility
2018-06-18 15:52:04 +02:00
Petter Blomberg
b381a973bc
Make TestHandler::hasRecord assert context, not only message
2018-06-18 15:50:12 +02:00
Robert Gust-Bardon
ad5b8f41b0
Merge branch '1.x' into rgb/signal-handler
2018-06-18 08:18:18 -05:00
Klemen Bratec
e8db808dd3
Allow setting stream chunk size in SocketHandler ( #1129 )
2018-06-18 11:31:46 +02:00
Jordi Boggiano
00aca28c8b
Fix SlackRecord normalization of fields, closes #1078
2018-06-17 18:03:59 +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
a6be840ff8
Merge pull request #1052 from gmsantos/1.x
...
Include InsightOps handler
2018-06-11 17:30:04 +02:00
Jordi Boggiano
5de973cd33
More 5.3 fixes
2018-06-09 10:23:30 +02:00
Jordi Boggiano
06f7bfb0ee
Fix 5.3 build
2018-06-08 23:41:14 +02:00
Minh-Quan TRAN
ada5d30511
If context has exactly 1000 items, do not truncate
2018-06-08 22:18:08 +02:00
Alban Kora
5f8783686e
Fixing file rotation when similar files are present
2018-06-08 22:10:08 +02:00
Jordi Boggiano
4814446331
Merge remote-tracking branch 'vincepare/1.x' into 1.x
2018-06-08 20:44:28 +02:00
Chris Wilkinson
3035d4a251
Fix WhatFailureGroupHandler::handleBatch when the handler has processors
2018-06-08 20:39:17 +02:00
George Mponos
68e39bd84f
Add a record with an object as context
2018-06-07 18:28:45 +02:00
tnucera
678693e5ef
Add context to fluentd formatter
2018-06-07 17:47:43 +02:00
Robert Gust-Bardon
cf979844dc
Register signal handlers
2018-02-22 11:16:36 -06:00
gmsantos
81db432c02
Include insightops handler
2017-09-10 00:13:37 -03:00
Vincent Paré
207c91699e
Custom exception handler ( #500 )
...
Add custom exception handler to let the user change the default
behavior when Monolog raise an exception while logging a record.
2017-07-14 12:18:44 +02:00
Jordi Boggiano
188a46836b
Fix DyanmoDbHandler test suite
2017-06-19 02:06:55 +02:00
Jordi Boggiano
2ea3d95ca2
Make sure this works on any hostname
2017-06-19 02:00:36 +02:00
Alex Rock Ancelet
d84af8db3c
Fix SwiftMailerHandler support for Swiftmailer 6.0+
2017-06-19 01:59:54 +02:00
Douglas Reith
765d225554
Support HeadlessChrome ( #966 )
...
* Support HeadlessChrome
2017-06-19 01:47:42 +02:00
Remon van de Kamp
deb0ea4ee7
Use first day/first month for date calculations in RotatingFileHandlerTest ( #963 )
...
When making the calculations for the filename of the current month using
date('d') does not work because you may run into the situation where you run
the tests on a day in a month that does not exist in the previous month,
for example March 30th. As there is no February 30th, PHP will skip ahead
to March, and the filename for the "previous" month will incorrectly be
"2017-03" instead of the expected "2017-02". Using the first day of the
month instead of the current day of the month solves this problem.
For consistency we now also use the first month of each year for calculations
regarding years even if this is not necessary, it would break symmetry
if we don't, plus it makes it clear that the value is not relevant in the
calculation.
2017-06-19 01:33:57 +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
Jordi Boggiano
3266b6e257
Fix test moar
2017-03-20 11:21:06 +01:00
Jordi Boggiano
e4774920ff
Fix test class
2017-03-20 11:04:39 +01:00
Jordi Boggiano
fb751dff33
Remove return annotations
2017-03-20 10:18:43 +01:00
Jordi Boggiano
c192b1a373
Remove strict types from test suite
2017-03-20 10:15:03 +01:00
Jordi Boggiano
3b1f98df2a
Fix 5.3 support
2017-03-20 10:07:14 +01:00
Erik Johansson
81e8bf6189
Add level parameter to payload when reporting Rollbar exceptions ( #852 )
2017-03-20 10:04:18 +01:00
Jordi Boggiano
24894709d1
Fix tests
2017-03-17 22:54:56 +01:00
ont
8c40211c3f
Fix array syntax for Travis CI
2017-03-15 12:00:44 +07:00
ont
aa6e88b6de
Complete rfc5424 header for SyslogUdpHandler
...
WARN: this commit adds backward incompatibility for the SyslogUdpHandler
constructor.
2017-03-15 00:57:06 +07:00
Tim Strijdhorst
e6b05c9173
Allow to set custom event_id [LEGACY] ( #930 )
...
* +allow to set a custom event_id as an extra parameter instead of letting Raven generate a UUIDv4
* +CS
* +CS
* +verbose array syntax because of PHP 5.3 support
2017-03-12 17:46:54 +01:00
Anton Nizhegorodov
b732364e70
Slack improvements ( #894 )
...
- [x] Exclude `extra`/`context`, `datetime`, `level` from message when attachment is used
- [x] Use `ts` attachment key to display `datetime` considering user timezone
- [x] [Support](https://github.com/Seldaek/monolog/pull/846#issuecomment-249528719 ) custom user images
- [x] [Allow](https://github.com/Seldaek/monolog/pull/894#issuecomment-263532399 ) to setup username from slack
- [x] [Improve](https://github.com/Seldaek/monolog/pull/846#issuecomment-261529198 ) array formatting within `context`/`extra`
- [x] [Support](https://github.com/Seldaek/monolog/issues/745 ) `include_stacktraces` option when attachment is not used and always include stacktraces when attachment is used
- [x] Support `extra`/`context` field exclusion
- [x] Update tests
2016-12-13 15:25:55 +01:00
Haralan Dobrev
9fbc286428
Add unit test for SlackbotHandler
2016-11-19 18:54:46 +02:00
Haralan Dobrev
43e1e69bad
Add unit tests for SlackWebhookHandler
2016-11-19 18:54:46 +02:00
Haralan Dobrev
26b526d9fb
Do not put empty Slack attachments array by default
2016-11-19 18:54:46 +02:00
Anton Nizhegorodov
5fa5e37305
Fix SlackHandler
...
Slack API requires to json_encode the attachment field.
2016-11-19 18:53:02 +02:00
Anton Nizhegorodov
d34de6bf30
Fix SlackRecordTest
2016-11-19 18:53:02 +02:00
Anton Nizhegorodov
08b577c657
Update SlackHandler tests && allow SlackRecord formatter change after construction
2016-11-19 18:53:02 +02:00
Anton Nizhegorodov
4ab8ed0a53
Make sure extra/context variables are stringified when more than one level deep
2016-11-19 18:53:01 +02:00
Anton Nizhegorodov
ec75076ded
Add more tests to SlackRecordTest
...
Conflicts:
- tests/Monolog/Handler/Slack/SlackRecordTest.php - merged the tests
2016-11-19 18:53:01 +02:00
Haralan Dobrev
7c2f58e7aa
Add initial tests for SlackRecord
2016-11-19 18:53:01 +02:00