From 59d4115734145e787d8e3539d755c1bcf6ee6058 Mon Sep 17 00:00:00 2001 From: Ahmed bhs Date: Sat, 17 Oct 2020 19:15:15 +0200 Subject: [PATCH] Update monolog_email.rst --- logging/monolog_email.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/logging/monolog_email.rst b/logging/monolog_email.rst index 7822de7c58c..2f6e2a7dcf1 100644 --- a/logging/monolog_email.rst +++ b/logging/monolog_email.rst @@ -194,6 +194,10 @@ actually deals with emailing you the error. The settings for this are straightforward, the to and from addresses, the formatter, the content type and the subject. +.. tip:: + +If you use messenger, make sure that your message class implements ``\JsonSerializable`` in order to get the message content in your logs, because messenger uses his monolog directly and his context serializer wish use ``json_encode`` for seriliazation. That's why we need to customize JSON representation when encoded is done with ``json_encode``. + You can combine these handlers with other handlers so that the errors still get logged on the server as well as the emails being sent: