$fileOpenMode
to StreamHandler
to define a custom fopen mode to open the log file (#1913)StreamHandler
handling of write failures so that it now closes/reopens the stream and retries the write once before failing (#1882)StreamHandler
error handler causing issues if a stream handler triggers an error (#1866)JsonFormatter
handling of incomplete classes (#1834)RotatingFileHandler
bug where rotation could sometimes not happen correctly (#1905)BrowserConsoleHandler
logging to use more appropriate methods than just console.log in the browser (#1739)WhatFailureGroupHandler
not catching errors happening inside close()
(#1791)GoogleCloudLoggingFormatter
(#1758)AmqpHandler->setExtraAttributes
not working with buffering handler wrappers (#1781)CubeHandler
and PHPConsoleHandler
as both projects are abandoned and those should not be used anymore (#1734)7
to 0
) support to Logger::log
and Logger::addRecord
to increase interoperability (#1723)__toString
for objects which are not json serializable in JsonFormatter
(#1733)GoogleCloudLoggingFormatter
(#1719)AmqpHandler->setExtraAttributes
to allow configuring attributes when using an AMQPExchange (#1724)\n
or \r
sequences (#1720)$datetime
parameter to Logger::addRecord
as low level API to allow logging into the past or future (#1682)Logger::useLoggingLoopDetection
to allow disabling cyclic logging detection in concurrent frameworks (#1681)Monolog\Test\TestCase
class as @internal
to make sure PHPStorm does not show it above PHPUnit, you may still use it to test your own handlers/etc though (#1677)SwiftMailerHandler
, use SymfonyMailerHandler
insteadSymfonyMailerHandler
(#1663)callType
to IntrospectionProcessor (#1612)Monolog\LogRecord
interface that can be used to type-hint records like array|\Monolog\LogRecord $record
to be forward compatible with the upcoming Monolog 3 changesincludeStacktraces
constructor params to LineFormatter & JsonFormatter (#1603)persistent
, timeout
, writingTimeout
, connectionTimeout
, chunkSize
constructor params to SocketHandler and derivatives (#1600)AsMonologProcessor
PHP attribute which can help autowiring / autoconfiguration of processors if frameworks / integrations decide to make use of it. This is useless when used purely with Monolog (#1637)user_agent
key in WebProcessor, disabled by default but you can use it by configuring the $extraFields you want (#1613)self
(#1609)@inheritDoc
annotations having the wrong caseJSON_INVALID_UTF8_SUBSTITUTE
to default json flags, so that invalid UTF8 characters now get converted to � instead of being converted from ISO-8859-15 to UTF8 as it was before, which was hardly a comprehensive solution$ignoreEmptyContextAndExtra
option to JsonFormatter to skip empty context/extra entirely from the output$parseMode
, $disableWebPagePreview
and $disableNotification
options to TelegramBotHandleradd*
(e.g. addWarning
) methods as well as emerg
, crit
, err
and warn
$dateFormat
option to the PsrLogMessageProcessor which lets you format DateTime instances nicelymongodb
extension in the MongoDBHandlernormalize
method, make sure you add the new $depth = 0
argument to your function signature to avoid strict PHP warnings.ResettableInterface
in order to reset/reset/clear/flush handlers and processorsProcessorInterface
as an optional way to label a class as being a processor (mostly useful for autowiring dependency containers)contexts
context or extra key to forward that to Sentry's contexts$ident
argument%message%
and other LineFormatter replacements in the subject line of emails sent with NativeMailHandler and SwiftMailerHandlerLogger->useMicrosecondTimestamps(false)
, disabling it gets you a bit of performance boost but reduces the precision to the second instead of microsecondLogger->withName
to clone a logger (keeping all handlers) with a new name%context.*%
in LineFormatterpayload
context value in RollbarHandlerfingerprint
context value in RavenHandlersetWritingTimeout()
checksum
and release
context/extra values in RavenHandler$useSSL
option to the PushoverHandler which is enabled by defaultMonolog\Logger
class is now an instance of Psr\Log\LoggerInterface
$flushOnOverflow
param to BufferHandler to flush by batches instead of losing
the oldest entriesserver
and referer
to WebProcessor output