Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@
* - newrelic:
* - [level]: level name or int value, defaults to DEBUG
* - [bubble]: bool, defaults to true
* - [app-name]: new relic app name, default null
*
* - hipchat:
* - token: hipchat api token
Expand Down Expand Up @@ -292,6 +293,7 @@ public function getConfigTreeBuilder()
->scalarNode('priority')->defaultValue(0)->end()
->scalarNode('level')->defaultValue('DEBUG')->end()
->booleanNode('bubble')->defaultTrue()->end()
->scalarNode('app-name')->defaultNull()->end()
->booleanNode('include_stacktraces')->defaultFalse()->end()
->scalarNode('path')->defaultValue('%kernel.logs_dir%/%kernel.environment%.log')->end() // stream and rotating
->scalarNode('file_permission') // stream and rotating
Expand Down
8 changes: 7 additions & 1 deletion DependencyInjection/MonologExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -614,10 +614,16 @@ private function buildHandler(ContainerBuilder $container, $name, array $handler
$handler['bubble'],
));
break;
case 'newrelic':
$definition->setArguments(array(
$handler['level'],
$handler['bubble'],
$handler['app-name'],
));
break;

// Handlers using the constructor of AbstractHandler without adding their own arguments
case 'browser_console':
case 'newrelic':
case 'test':
case 'null':
case 'debug':
Expand Down
1 change: 1 addition & 0 deletions Resources/config/schema/monolog-1.0.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<xsd:attribute name="priority" type="xsd:integer" />
<xsd:attribute name="level" type="level" />
<xsd:attribute name="bubble" type="xsd:boolean" />
<xsd:attribute name="app-name" type="xsd:string" />
<xsd:attribute name="path" type="xsd:string" />
<xsd:attribute name="id" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" use="required" />
Expand Down