72 protected function write(array $record)
84 unset($record[
'formatted'][
'context'][
'transaction_name']);
87 if (isset($record[
'context'][
'exception']) && $record[
'context'][
'exception'] instanceof \
Exception) {
89 unset($record[
'formatted'][
'context'][
'exception']);
94 foreach ($record[
'formatted'][
'context'] as $key => $parameter) {
95 if (is_array($parameter) && $this->explodeArrays) {
96 foreach ($parameter as $paramKey => $paramValue) {
104 foreach ($record[
'formatted'][
'extra'] as $key => $parameter) {
105 if (is_array($parameter) && $this->explodeArrays) {
106 foreach ($parameter as $paramKey => $paramValue) {
122 return extension_loaded(
'newrelic');
134 if (isset($context[
'appname'])) {
135 return $context[
'appname'];
151 if (isset($context[
'transaction_name'])) {
152 return $context[
'transaction_name'];
184 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)