-
-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add handler_default_channels configuration option
- Loading branch information
Showing
7 changed files
with
203 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
Tests/DependencyInjection/Fixtures/xml/handlers_with_default_channels.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?xml version="1.0" ?> | ||
|
||
<container xmlns="http://symfony.com/schema/dic/services" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:monolog="http://symfony.com/schema/dic/monolog" | ||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd | ||
http://symfony.com/schema/dic/monolog http://symfony.com/schema/dic/monolog/monolog-1.0.xsd"> | ||
|
||
<monolog:config> | ||
<monolog:channel>foo</monolog:channel> | ||
<monolog:channel>bar</monolog:channel> | ||
<monolog:channel>baz</monolog:channel> | ||
|
||
<monolog:handler-default-channels> | ||
<monolog:channel>!foo</monolog:channel> | ||
<monolog:channel>!bar</monolog:channel> | ||
</monolog:handler-default-channels> | ||
|
||
<monolog:handler name="one" type="stream" use-default-channels="true"> | ||
<monolog:channels> | ||
<monolog:channel>foo</monolog:channel> | ||
</monolog:channels> | ||
</monolog:handler> | ||
<monolog:handler name="two" type="stream" use-default-channels="false"> | ||
<monolog:channels> | ||
<monolog:channel>!bar</monolog:channel> | ||
<monolog:channel>!baz</monolog:channel> | ||
</monolog:channels> | ||
</monolog:handler> | ||
<monolog:handler name="three" type="stream" use-default-channels="true"> | ||
<monolog:channels> | ||
<monolog:channel>!bar</monolog:channel> | ||
<monolog:channel>!baz</monolog:channel> | ||
</monolog:channels> | ||
</monolog:handler> | ||
<monolog:handler name="four" type="stream" use-default-channels="true" /> | ||
<monolog:handler name="five" type="stream" use-default-channels="false" /> | ||
<monolog:handler name="six" type="stream" /> | ||
</monolog:config> | ||
</container> |
24 changes: 24 additions & 0 deletions
24
Tests/DependencyInjection/Fixtures/yml/handlers_with_default_channels.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
monolog: | ||
channels: [ 'foo', 'bar', 'baz' ] | ||
handler_default_channels: [ '!foo', '!bar' ] | ||
handlers: | ||
one: | ||
type: stream | ||
use_default_channels: true | ||
channels: foo | ||
two: | ||
type: stream | ||
use_default_channels: false | ||
channels: [ '!bar', '!baz' ] | ||
three: | ||
type: stream | ||
use_default_channels: true | ||
channels: [ '!bar', '!baz' ] | ||
four: | ||
type: stream | ||
use_default_channels: true | ||
five: | ||
type: stream | ||
use_default_channels: false | ||
six: | ||
type: stream |