74 protected function write(array $record)
86 unset($record[
'formatted'][
'context'][
'transaction_name']);
89 if (isset($record[
'context'][
'exception']) && ($record[
'context'][
'exception'] instanceof \
Exception || (PHP_VERSION_ID >= 70000 && $record[
'context'][
'exception'] instanceof \
Throwable))) {
91 unset($record[
'formatted'][
'context'][
'exception']);
96 if (isset($record[
'formatted'][
'context']) && is_array($record[
'formatted'][
'context'])) {
97 foreach ($record[
'formatted'][
'context'] as
$key => $parameter) {
98 if (is_array($parameter) && $this->explodeArrays) {
99 foreach ($parameter as $paramKey => $paramValue) {
108 if (isset($record[
'formatted'][
'extra']) && is_array($record[
'formatted'][
'extra'])) {
109 foreach ($record[
'formatted'][
'extra'] as
$key => $parameter) {
110 if (is_array($parameter) && $this->explodeArrays) {
111 foreach ($parameter as $paramKey => $paramValue) {
128 return extension_loaded(
'newrelic');
140 if (isset($context[
'appname'])) {
141 return $context[
'appname'];
157 if (isset($context[
'transaction_name'])) {
158 return $context[
'transaction_name'];
190 if (null === $value || is_scalar($value)) {
setNewRelicTransactionName($transactionName)
Overwrites the name of the current transaction.
setNewRelicAppName($appName)
Sets the NewRelic application that should receive this log.
const ERROR
Runtime errors.
getTransactionName(array $context)
Returns the name of the current transaction.
Base Handler class providing the Handler structure.
__construct( $level=Logger::ERROR, $bubble=true, $appName=null, $explodeArrays=false, $transactionName=null)
getAppName(array $context)
Returns the appname where this log should be sent.
Class to record a log on a NewRelic application.
newrelic_add_custom_parameter($key, $value)
Exception can be thrown if an extension for an handler is missing.
newrelic_name_transaction($transactionName)
isNewRelicEnabled()
Checks whether the NewRelic extension is enabled in the system.
setNewRelicParameter($key, $value)
newrelic_set_appname($appname)