You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We cannot help much without knowing this code of this LogDNAFormatter.
but formatters are not expected to modify the message in the LogRecord itself as that would leak the formatted message to other handlers that might use a different formatting. that's why the property is read-only.
Yeah you should just return a formatted string or array or something instead of modifying the log record. You can use $record->toArray() to get a monolog-v2 style array out of it for BC.
Monolog version 3
Recently we upgraded from monolog 2 to Monolog 3 after that we are getting below error:
WARN PHP Fatal error: Uncaught Error: Cannot modify readonly property Monolog\LogRecord::$message in app/Utils/Logging/LogDNAFormatter.php:20.
The text was updated successfully, but these errors were encountered: