1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-11 23:54:04 +02:00

NewRelic handler: added the app name

This commit is contained in:
odino
2013-08-26 12:04:22 +04:00
parent 7a8844d4db
commit db3df1a1fa
2 changed files with 15 additions and 0 deletions

View File

@@ -36,6 +36,12 @@ class NewRelicHandlerTest extends TestCase
$handler = new StubNewRelicHandler();
$handler->handle($this->getRecord(Logger::ERROR, 'log message', array('a' => 'b')));
}
public function testThehandlerCanAddTheAppName()
{
$handler = new StubNewRelicHandler();
$handler->handle($this->getRecord(Logger::ERROR, 'log message', array('appname' => 'myApp')));
}
}
class StubNewRelicHandlerWithoutExtension extends NewRelicHandler
@@ -59,6 +65,11 @@ function newrelic_notice_error()
return true;
}
function newrelic_set_appname()
{
return true;
}
function newrelic_add_custom_parameter()
{
return true;