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

889 Commits

Author SHA1 Message Date
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
Jeroen Thora
8ceda1b62e Removed unnecessary php version checks after php dependency bump to 7.0 2015-12-20 15:53:48 +01:00
Diego Saint Esteben
4422cdc2b6 Unset the "datetime" parameter in LogglyFormatter 2015-12-18 17:08:31 -03:00
Jordi Boggiano
6c424f851c Add a lot more scalar types and go strict in Logger 2015-12-18 17:48:48 +00:00
Jordi Boggiano
b5b773e12f Fix naming conflicts in PhpConsoleHandler 2015-12-18 17:48:45 +00:00
Jordi Boggiano
902c0c8694 Split interfaces and base/abstract classes into more sensible pieces 2015-12-18 17:48:40 +00:00
Jordi Boggiano
39f8a20e6d Remove non-PSR-3 methods for adding log records 2015-12-18 17:48:38 +00:00
Jordi Boggiano
6505e02fd3 Change timezone to be per-instance and not global 2015-12-18 17:48:36 +00: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
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