File tree Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Expand file tree Collapse file tree 3 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,10 @@ Here are some important envelope stamps that are shipped with the Symfony Messen
162
162
to configure the validation groups used when the validation middleware is enabled.
163
163
* :class: `Symfony\\ Component\\ Messenger\\ Stamp\\ ErrorDetailsStamp `,
164
164
an internal stamp when a message fails due to an exception in the handler.
165
+ * :class: `Symfony\\ Component\\ Messenger\\ Stamp\\ ScheduledStamp `,
166
+ a stamp that marks the message as produced by a scheduler. This helps
167
+ differentiate it from messages created "manually". You can learn more about it
168
+ in the :doc: `Scheduler documentation </scheduler >`.
165
169
166
170
.. note ::
167
171
Original file line number Diff line number Diff line change @@ -155,6 +155,7 @@ to write logs using the :phpfunction:`syslog` function:
155
155
.. code-block :: php
156
156
157
157
// config/packages/prod/monolog.php
158
+ use Psr\Log\LogLevel;
158
159
use Symfony\Config\MonologConfig;
159
160
160
161
return static function (MonologConfig $monolog): void {
@@ -164,12 +165,12 @@ to write logs using the :phpfunction:`syslog` function:
164
165
// log to var/logs/(environment).log
165
166
->path('%kernel.logs_dir%/%kernel.environment%.log')
166
167
// log *all* messages (debug is lowest level)
167
- ->level('debug' );
168
+ ->level(LogLevel::DEBUG );
168
169
169
170
$monolog->handler('syslog_handler')
170
171
->type('syslog')
171
172
// log error-level messages and higher
172
- ->level('error' );
173
+ ->level(LogLevel::ERROR );
173
174
};
174
175
175
176
This defines a *stack * of handlers and each handler is called in the order that it's
Original file line number Diff line number Diff line change @@ -881,6 +881,10 @@ before being further redispatched to its corresponding handler::
881
881
}
882
882
}
883
883
884
+ When using the ``RedispatchMessage ``, Symfony will attach a
885
+ :class: `Symfony\\ Component\\ Messenger\\ Stamp\\ ScheduledStamp ` to the message,
886
+ helping you identify those messages when needed.
887
+
884
888
.. _`Memoizing` : https://en.wikipedia.org/wiki/Memoization
885
889
.. _`cron command-line utility` : https://en.wikipedia.org/wiki/Cron
886
890
.. _`crontab.guru website` : https://crontab.guru/
You can’t perform that action at this time.
0 commit comments