Skip to content

Commit 1557353

Browse files
committed
Exposes Sentry\Monolog\Handler service for easier monolog configuration.
1 parent 0a12cde commit 1557353

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

examples/symfony-3/app/config/config_prod.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,10 @@ monolog:
2525
level: debug
2626
console:
2727
type: console
28+
29+
# uncomment if You want to log Your custom application logs in Sentry and adjust to Your needs
30+
#sentry:
31+
# type: service
32+
# id: Sentry\Monolog\Handler
33+
# min_level: error
34+
# channels: ["app"]

src/Resources/config/services.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
</call>
2323
</service>
2424

25+
<service id="Sentry\Monolog\Handler" class="Sentry\Monolog\Handler">
26+
<argument type="service" id="Sentry\State\HubInterface" />
27+
</service>
28+
2529
<service id="Sentry\SentryBundle\EventListener\ConsoleListener" class="Sentry\SentryBundle\EventListener\ConsoleListener" public="false">
2630
<argument type="service" id="Sentry\State\HubInterface" />
2731
<argument type="service" id="security.token_storage" on-invalid="ignore" />

0 commit comments

Comments
 (0)