mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-06 13:16:39 +02:00
Clarify/fix bubbling docs, fixes #229
This commit is contained in:
@@ -45,8 +45,8 @@ the bottom of the stack that will log anything to disk, and on top of that add
|
||||
a `MailHandler` that will send emails only when an error message is logged.
|
||||
Handlers also have a `$bubble` property which defines whether they block the
|
||||
record or not if they handled it. In this example, setting the `MailHandler`'s
|
||||
`$bubble` argument to true means that all records will propagate to the
|
||||
`StreamHandler`, even the errors that are handled by the `MailHandler`.
|
||||
`$bubble` argument to false means that records handled by the `MailHandler` will
|
||||
not propagate to the `StreamHandler` anymore.
|
||||
|
||||
You can create many `Logger`s, each defining a channel (e.g.: db, request,
|
||||
router, ..) and each of them combining various handlers, which can be shared
|
||||
|
@@ -23,7 +23,7 @@ use Monolog\Formatter\LineFormatter;
|
||||
abstract class AbstractHandler implements HandlerInterface
|
||||
{
|
||||
protected $level = Logger::DEBUG;
|
||||
protected $bubble = false;
|
||||
protected $bubble = true;
|
||||
|
||||
/**
|
||||
* @var FormatterInterface
|
||||
@@ -141,8 +141,8 @@ abstract class AbstractHandler implements HandlerInterface
|
||||
/**
|
||||
* Sets the bubbling behavior.
|
||||
*
|
||||
* @param Boolean $bubble True means that bubbling is not permitted.
|
||||
* False means that this handler allows bubbling.
|
||||
* @param Boolean $bubble true means that this handler allows bubbling.
|
||||
* false means that bubbling is not permitted.
|
||||
* @return self
|
||||
*/
|
||||
public function setBubble($bubble)
|
||||
@@ -155,8 +155,8 @@ abstract class AbstractHandler implements HandlerInterface
|
||||
/**
|
||||
* Gets the bubbling behavior.
|
||||
*
|
||||
* @return Boolean True means that bubbling is not permitted.
|
||||
* False means that this handler allows bubbling.
|
||||
* @return Boolean true means that this handler allows bubbling.
|
||||
* false means that bubbling is not permitted.
|
||||
*/
|
||||
public function getBubble()
|
||||
{
|
||||
|
@@ -46,8 +46,8 @@ interface HandlerInterface
|
||||
* calling further handlers in the stack with a given log record.
|
||||
*
|
||||
* @param array $record The record to handle
|
||||
* @return Boolean True means that this handler handled the record, and that bubbling is not permitted.
|
||||
* False means the record was either not processed or that this handler allows bubbling.
|
||||
* @return Boolean true means that this handler handled the record, and that bubbling is not permitted.
|
||||
* false means the record was either not processed or that this handler allows bubbling.
|
||||
*/
|
||||
public function handle(array $record);
|
||||
|
||||
|
Reference in New Issue
Block a user