| 148 |
lars |
1 |
### 2.0.0
|
|
|
2 |
|
|
|
3 |
- `Monolog\Logger::API` can be used to distinguish between a Monolog `1` and `2`
|
|
|
4 |
install of Monolog when writing integration code.
|
|
|
5 |
|
|
|
6 |
- Removed non-PSR-3 methods to add records, all the `add*` (e.g. `addWarning`)
|
|
|
7 |
methods as well as `emerg`, `crit`, `err` and `warn`.
|
|
|
8 |
|
|
|
9 |
- DateTime are now formatted with a timezone and microseconds (unless disabled).
|
|
|
10 |
Various formatters and log output might be affected, which may mess with log parsing
|
|
|
11 |
in some cases.
|
|
|
12 |
|
|
|
13 |
- The `datetime` in every record array is now a DateTimeImmutable, not that you
|
|
|
14 |
should have been modifying these anyway.
|
|
|
15 |
|
|
|
16 |
- The timezone is now set per Logger instance and not statically, either
|
|
|
17 |
via ->setTimezone or passed in the constructor. Calls to Logger::setTimezone
|
|
|
18 |
should be converted.
|
|
|
19 |
|
|
|
20 |
- `HandlerInterface` has been split off and two new interfaces now exist for
|
|
|
21 |
more granular controls: `ProcessableHandlerInterface` and
|
|
|
22 |
`FormattableHandlerInterface`. Handlers not extending `AbstractHandler`
|
|
|
23 |
should make sure to implement the relevant interfaces.
|
|
|
24 |
|
|
|
25 |
- `HandlerInterface` now requires the `close` method to be implemented. This
|
|
|
26 |
only impacts you if you implement the interface yourself, but you can extend
|
|
|
27 |
the new `Monolog\Handler\Handler` base class too.
|
|
|
28 |
|
|
|
29 |
- There is no more default handler configured on empty Logger instances, if
|
|
|
30 |
you were relying on that you will not get any output anymore, make sure to
|
|
|
31 |
configure the handler you need.
|
|
|
32 |
|
|
|
33 |
#### LogglyFormatter
|
|
|
34 |
|
|
|
35 |
- The records' `datetime` is not sent anymore. Only `timestamp` is sent to Loggly.
|
|
|
36 |
|
|
|
37 |
#### AmqpHandler
|
|
|
38 |
|
|
|
39 |
- Log levels are not shortened to 4 characters anymore. e.g. a warning record
|
|
|
40 |
will be sent using the `warning.channel` routing key instead of `warn.channel`
|
|
|
41 |
as in 1.x.
|
|
|
42 |
- The exchange name does not default to 'log' anymore, and it is completely ignored
|
|
|
43 |
now for the AMQP extension users. Only PHPAmqpLib uses it if provided.
|
|
|
44 |
|
|
|
45 |
#### RotatingFileHandler
|
|
|
46 |
|
|
|
47 |
- The file name format must now contain `{date}` and the date format must be set
|
|
|
48 |
to one of the predefined FILE_PER_* constants to avoid issues with file rotation.
|
|
|
49 |
See `setFilenameFormat`.
|
|
|
50 |
|
|
|
51 |
#### LogstashFormatter
|
|
|
52 |
|
|
|
53 |
- Removed Logstash V0 support
|
|
|
54 |
- Context/extra prefix has been removed in favor of letting users configure the exact key being sent
|
|
|
55 |
- Context/extra data are now sent as an object instead of single keys
|
|
|
56 |
|
|
|
57 |
#### HipChatHandler
|
|
|
58 |
|
|
|
59 |
- Removed deprecated HipChat handler, migrate to Slack and use SlackWebhookHandler or SlackHandler instead
|
|
|
60 |
|
|
|
61 |
#### SlackbotHandler
|
|
|
62 |
|
|
|
63 |
- Removed deprecated SlackbotHandler handler, use SlackWebhookHandler or SlackHandler instead
|
|
|
64 |
|
|
|
65 |
#### RavenHandler
|
|
|
66 |
|
|
|
67 |
- Removed deprecated RavenHandler handler, use sentry/sentry 2.x and their Sentry\Monolog\Handler instead
|
|
|
68 |
|
|
|
69 |
#### ElasticSearchHandler
|
|
|
70 |
|
|
|
71 |
- As support for the official Elasticsearch library was added, the former ElasticSearchHandler has been
|
|
|
72 |
renamed to ElasticaHandler and the new one added as ElasticsearchHandler.
|