Skip to content

Commit d2fd04a

Browse files
committed
Merge remote-tracking branch 'dquerioux/master'
2 parents 4cb2abb + 9b449c5 commit d2fd04a

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

DependencyInjection/Configuration.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@
173173
* - newrelic:
174174
* - [level]: level name or int value, defaults to DEBUG
175175
* - [bubble]: bool, defaults to true
176+
* - [app-name]: new relic app name, default null
176177
*
177178
* - hipchat:
178179
* - token: hipchat api token
@@ -298,6 +299,7 @@ public function getConfigTreeBuilder()
298299
->scalarNode('priority')->defaultValue(0)->end()
299300
->scalarNode('level')->defaultValue('DEBUG')->end()
300301
->booleanNode('bubble')->defaultTrue()->end()
302+
->scalarNode('app-name')->defaultNull()->end()
301303
->booleanNode('include_stacktraces')->defaultFalse()->end()
302304
->scalarNode('path')->defaultValue('%kernel.logs_dir%/%kernel.environment%.log')->end() // stream and rotating
303305
->scalarNode('file_permission') // stream and rotating

DependencyInjection/MonologExtension.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,10 +625,16 @@ private function buildHandler(ContainerBuilder $container, $name, array $handler
625625
$handler['bubble'],
626626
));
627627
break;
628+
case 'newrelic':
629+
$definition->setArguments(array(
630+
$handler['level'],
631+
$handler['bubble'],
632+
$handler['app-name'],
633+
));
634+
break;
628635

629636
// Handlers using the constructor of AbstractHandler without adding their own arguments
630637
case 'browser_console':
631-
case 'newrelic':
632638
case 'test':
633639
case 'null':
634640
case 'debug':

Resources/config/schema/monolog-1.0.xsd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<xsd:attribute name="priority" type="xsd:integer" />
3333
<xsd:attribute name="level" type="level" />
3434
<xsd:attribute name="bubble" type="xsd:boolean" />
35+
<xsd:attribute name="app-name" type="xsd:string" />
3536
<xsd:attribute name="path" type="xsd:string" />
3637
<xsd:attribute name="id" type="xsd:string" />
3738
<xsd:attribute name="name" type="xsd:string" use="required" />

0 commit comments

Comments
 (0)