Update to Drupal 8.1.0. For more information, see https://www.drupal.org/drupal-8.1.0-release-notes
This commit is contained in:
parent
b11a755ba8
commit
c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Logger\LogMessageParser.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Logger;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Logger\LogMessageParserInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Logger;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Logger\LoggerChannel.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Logger;
|
||||
|
||||
use Drupal\Core\Session\AccountInterface;
|
||||
|
|
@ -19,6 +14,26 @@ use Symfony\Component\HttpFoundation\RequestStack;
|
|||
class LoggerChannel implements LoggerChannelInterface {
|
||||
use LoggerTrait;
|
||||
|
||||
/**
|
||||
* Maximum call depth to self::log() for a single log message.
|
||||
*
|
||||
* It's very easy for logging channel code to call out to other library code
|
||||
* that will create log messages. In that case, we will recurse back in to
|
||||
* LoggerChannel::log() multiple times while processing a single originating
|
||||
* message. To prevent infinite recursion, we track the call depth and bail
|
||||
* out at LoggerChannel::MAX_CALL_DEPTH iterations.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
const MAX_CALL_DEPTH = 5;
|
||||
|
||||
/**
|
||||
* Number of times LoggerChannel::log() has been called for a single message.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $callDepth = 0;
|
||||
|
||||
/**
|
||||
* The name of the channel of this logger instance.
|
||||
*
|
||||
|
|
@ -77,6 +92,11 @@ class LoggerChannel implements LoggerChannelInterface {
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
public function log($level, $message, array $context = array()) {
|
||||
if ($this->callDepth == self::MAX_CALL_DEPTH) {
|
||||
return;
|
||||
}
|
||||
$this->callDepth++;
|
||||
|
||||
// Merge in defaults.
|
||||
$context += array(
|
||||
'channel' => $this->channel,
|
||||
|
|
@ -115,6 +135,8 @@ class LoggerChannel implements LoggerChannelInterface {
|
|||
foreach ($this->sortLoggers() as $logger) {
|
||||
$logger->log($level, $message, $context);
|
||||
}
|
||||
|
||||
$this->callDepth--;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Logger\LoggerChannelFactory.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Logger;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Logger\LoggerChannelFactoryInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Logger;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Logger\LoggerChannelInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Logger;
|
||||
|
||||
use Drupal\Core\Session\AccountInterface;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Logger\RfcLogLevel.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Logger;
|
||||
|
||||
use Drupal\Core\StringTranslation\TranslatableMarkup;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Core\Logger\RfcLoggerTrait.
|
||||
*/
|
||||
|
||||
namespace Drupal\Core\Logger;
|
||||
|
||||
/**
|
||||
|
|
|
|||
Reference in a new issue