1
0
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:
Jordi Boggiano
2013-09-02 12:20:30 +02:00
parent 933f7e26be
commit 1518320bec
3 changed files with 9 additions and 9 deletions

View File

@@ -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. 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 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 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 `$bubble` argument to false means that records handled by the `MailHandler` will
`StreamHandler`, even the errors that are handled by the `MailHandler`. not propagate to the `StreamHandler` anymore.
You can create many `Logger`s, each defining a channel (e.g.: db, request, 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 router, ..) and each of them combining various handlers, which can be shared

View File

@@ -23,7 +23,7 @@ use Monolog\Formatter\LineFormatter;
abstract class AbstractHandler implements HandlerInterface abstract class AbstractHandler implements HandlerInterface
{ {
protected $level = Logger::DEBUG; protected $level = Logger::DEBUG;
protected $bubble = false; protected $bubble = true;
/** /**
* @var FormatterInterface * @var FormatterInterface
@@ -141,8 +141,8 @@ abstract class AbstractHandler implements HandlerInterface
/** /**
* Sets the bubbling behavior. * Sets the bubbling behavior.
* *
* @param Boolean $bubble True means that bubbling is not permitted. * @param Boolean $bubble true means that this handler allows bubbling.
* False means that this handler allows bubbling. * false means that bubbling is not permitted.
* @return self * @return self
*/ */
public function setBubble($bubble) public function setBubble($bubble)
@@ -155,8 +155,8 @@ abstract class AbstractHandler implements HandlerInterface
/** /**
* Gets the bubbling behavior. * Gets the bubbling behavior.
* *
* @return Boolean True means that bubbling is not permitted. * @return Boolean true means that this handler allows bubbling.
* False means that this handler allows bubbling. * false means that bubbling is not permitted.
*/ */
public function getBubble() public function getBubble()
{ {

View File

@@ -46,8 +46,8 @@ interface HandlerInterface
* calling further handlers in the stack with a given log record. * calling further handlers in the stack with a given log record.
* *
* @param array $record The record to handle * @param array $record The record to handle
* @return Boolean True means that this handler handled the record, and that bubbling is not permitted. * @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. * false means the record was either not processed or that this handler allows bubbling.
*/ */
public function handle(array $record); public function handle(array $record);