25 self::$appname = null;
26 self::$customParameters = array();
27 self::$transactionName = null;
49 $this->assertEquals(array(
'context_a' =>
'b'), self::$customParameters);
58 array(
'a' => array(
'key1' =>
'value1',
'key2' =>
'value2'))
61 array(
'context_a_key1' =>
'value1',
'context_a_key2' =>
'value2'),
62 self::$customParameters
69 $record[
'extra'] = array(
'c' =>
'd');
72 $handler->handle($record);
74 $this->assertEquals(array(
'extra_c' =>
'd'), self::$customParameters);
80 $record[
'extra'] = array(
'c' => array(
'key1' =>
'value1',
'key2' =>
'value2'));
83 $handler->handle($record);
86 array(
'extra_c_key1' =>
'value1',
'extra_c_key2' =>
'value2'),
87 self::$customParameters
94 $record[
'extra'] = array(
'c' =>
'd');
97 $handler->handle($record);
104 $this->assertEquals($expected, self::$customParameters);
112 $this->assertEquals(null, self::$appname);
120 $this->assertEquals(
'myAppName', self::$appname);
128 $this->assertEquals(
'logAppName', self::$appname);
136 $this->assertEquals(null, self::$transactionName);
144 $this->assertEquals(
'myTransaction', self::$transactionName);
150 $handler->handle($this->
getRecord(
Logger::ERROR,
'log message', array(
'transaction_name' =>
'logTransactName')));
152 $this->assertEquals(
'logTransactName', self::$transactionName);
const DEBUG
Detailed debug information.
const ERROR
Runtime errors.
testTheTransactionNameCanBeInjectedFromTheConstructor()
testThehandlerCanAddExtraParamsToTheNewRelicTrace()
testThehandlerCanHandleTheRecord()
testThehandlerCanAddContextParamsToTheNewRelicTrace()
testTheTransactionNameCanBeOverriddenFromEachLog()
testThehandlerCanAddExplodedContextParamsToTheNewRelicTrace()
getRecord($level=Logger::WARNING, $message='test', $context=array())
testTheTransactionNameIsNullByDefault()
testTheAppNameCanBeOverriddenFromEachLog()
Class to record a log on a NewRelic application.
newrelic_add_custom_parameter($key, $value)
testTheAppNameIsNullByDefault()
newrelic_name_transaction($transactionName)
testThehandlerCanAddExplodedExtraParamsToTheNewRelicTrace()
testThehandlerThrowsAnExceptionIfTheNRExtensionIsNotLoaded()
Monolog
testThehandlerCanAddExtraContextAndParamsToTheNewRelicTrace()
newrelic_set_appname($appname)
testTheAppNameCanBeInjectedFromtheConstructor()