"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php" between
glpi-9.3.3.tgz and glpi-9.4.0.tgz

About: GLPI is an IT and asset management software (Information Resource Manager).

NewRelicHandler.php  (glpi-9.3.3.tgz):NewRelicHandler.php  (glpi-9.4.0.tgz)
skipping to change at line 21 skipping to change at line 21
namespace Monolog\Handler; namespace Monolog\Handler;
use Monolog\Logger; use Monolog\Logger;
use Monolog\Formatter\NormalizerFormatter; use Monolog\Formatter\NormalizerFormatter;
/** /**
* Class to record a log on a NewRelic application. * Class to record a log on a NewRelic application.
* Enabling New Relic High Security mode may prevent capture of useful informati on. * Enabling New Relic High Security mode may prevent capture of useful informati on.
* *
* This handler requires a NormalizerFormatter to function and expects an array
in $record['formatted']
*
* @see https://docs.newrelic.com/docs/agents/php-agent * @see https://docs.newrelic.com/docs/agents/php-agent
* @see https://docs.newrelic.com/docs/accounts-partnerships/accounts/security/h igh-security * @see https://docs.newrelic.com/docs/accounts-partnerships/accounts/security/h igh-security
*/ */
class NewRelicHandler extends AbstractProcessingHandler class NewRelicHandler extends AbstractProcessingHandler
{ {
/** /**
* Name of the New Relic application that will receive logs from this handle r. * Name of the New Relic application that will receive logs from this handle r.
* *
* @var string * @var string
*/ */
skipping to change at line 87 skipping to change at line 89
if ($appName = $this->getAppName($record['context'])) { if ($appName = $this->getAppName($record['context'])) {
$this->setNewRelicAppName($appName); $this->setNewRelicAppName($appName);
} }
if ($transactionName = $this->getTransactionName($record['context'])) { if ($transactionName = $this->getTransactionName($record['context'])) {
$this->setNewRelicTransactionName($transactionName); $this->setNewRelicTransactionName($transactionName);
unset($record['formatted']['context']['transaction_name']); unset($record['formatted']['context']['transaction_name']);
} }
if (isset($record['context']['exception']) && $record['context']['except ion'] instanceof \Exception) { if (isset($record['context']['exception']) && ($record['context']['excep tion'] instanceof \Exception || (PHP_VERSION_ID >= 70000 && $record['context'][' exception'] instanceof \Throwable))) {
newrelic_notice_error($record['message'], $record['context']['except ion']); newrelic_notice_error($record['message'], $record['context']['except ion']);
unset($record['formatted']['context']['exception']); unset($record['formatted']['context']['exception']);
} else { } else {
newrelic_notice_error($record['message']); newrelic_notice_error($record['message']);
} }
if (isset($record['formatted']['context']) && is_array($record['formatte d']['context'])) { if (isset($record['formatted']['context']) && is_array($record['formatte d']['context'])) {
foreach ($record['formatted']['context'] as $key => $parameter) { foreach ($record['formatted']['context'] as $key => $parameter) {
if (is_array($parameter) && $this->explodeArrays) { if (is_array($parameter) && $this->explodeArrays) {
foreach ($parameter as $paramKey => $paramValue) { foreach ($parameter as $paramKey => $paramValue) {
 End of changes. 2 change blocks. 
1 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)