1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-02-19 20:44:50 +01:00

418 Commits

Author SHA1 Message Date
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
Matt Wells
050694291e Adds ability to cap log size in redis
100% backward compatible, defaults to not capping collection size.

Additional constructor param of $capSize added which will ensure logs
list is treated as a FILO queue

Test coverage on new functionality
2015-07-12 17:26:16 +01:00
Jordi Boggiano
bfe5081735 Fix idiotic sunday 2015-07-12 14:05:44 +01:00
Jordi Boggiano
558678b420 Adjust check for php5.3/5.4 2015-07-12 14:01:43 +01:00
Jordi Boggiano
0c8a92af47 Throw exception when json encoding fails and errors are not ignored, fixes #545 2015-07-12 13:44:48 +01:00
Jordi Boggiano
66532794b0 Add TagProcessor::addTags and TagProcessor::setTags, fixes #588 2015-07-12 11:55:38 +01:00
Jordi Boggiano
2dc16dd802 Avoid issues with ErrorHandler being used in test suite 2015-07-12 11:54:49 +01:00
Jordi Boggiano
b09370b13a Skip invalid windows tests 2015-07-12 11:24:20 +01:00
Dominik Zogg
fe12c5278f stream handler creates a directory if its possible 2015-07-05 12:09:12 +00:00
Austin Hyde
f2fea2c3f5 Add TestHandler::hasRecordThatMatches($regex, $level) 2015-06-20 19:41:52 -04:00
Austin Hyde
3e8f0ecb36 Replace boilerplate with magic methods 2015-06-20 19:39:06 -04:00
Austin Hyde
29da1d8e77 Add a message to assertions to know which ones fail 2015-06-20 19:14:33 -04:00
Jordi Boggiano
0c3d2082ad Merge pull request #526 from esalter/master
Add Hipchat V2 support
2015-06-19 11:46:55 +01:00
Roberto Araujo
d8e7f9debf Fix HipChatHandler tests 2015-06-12 16:52:46 -03:00
Jordi Boggiano
131b27d113 Update test for 5.4/5.3 2015-06-01 22:33:28 +01:00
Jordi Boggiano
8dbc563310 Merge pull request #541 from smazurov/patch-2
made raven user context less destructive
2015-06-01 22:06:43 +01:00
Jordi Boggiano
1a1f506f0e Fix up #546 to json serialize correctly 2015-06-01 21:42:42 +01:00
Jordi Boggiano
cbf17236e6 Merge remote-tracking branch 'draev/patch-1' 2015-06-01 21:32:03 +01:00
Jordi Boggiano
8c4b1be4a2 Change Logger::setTimezone to accept a DateTimeZone object, refs #566 2015-06-01 21:15:07 +01:00
Bryan Davis
5d7db08106 Add Logger::setTimezone()
Add a setter method to allow changing the timezone used when creating
new log records. This provides a means to correct a behavioral change
introduced by 6cbdc04 where use of the PHP runtime default timezone
provided by `date_default_timezone_get()` was introduced. In most
environments the new default behavior is preferable, but if an
application allows the default timezone to vary between requests it
causes confusing log output.
2015-05-20 22:05:03 -06:00
Reinier Kip
162c30768d Allow PSR-3 passthru level in FingersCrossedHandler. 2015-05-11 13:26:40 +02:00
Jordi Boggiano
e968bd36e5 Merge pull request #553 from JeroenDeDauw/AmqpHandlerTest
Remove unused import in AmqpHandlerTest
2015-05-05 18:13:34 +01:00
Jordi Boggiano
1065abe1f7 Merge pull request #552 from JeroenDeDauw/deadvar
Remove dead varialble
2015-04-30 18:29:05 +01:00
jeroendedauw
f8f6615887 Remopve dead varialble
This makes it more obvious that this test is not actually doing much
2015-04-27 01:53:56 +02:00