Skip to content

Commit 35a8d8d

Browse files
authored
Merge pull request #2 from buggregator/issue/1
Adds information about symfony monolog configuration.
2 parents 370af7b + e8df7db commit 35a8d8d

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

docs/config/monolog.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,31 @@ LOG_CHANNEL=socket
7575
LOG_SOCKET_URL=127.0.0.1:9913
7676
```
7777

78+
## Symfony
79+
80+
Here is an example of how to configure Monolog to send logs to Buggregator in Symfony.
81+
82+
```yaml
83+
# config/packages/dev/monolog.yaml
84+
monolog:
85+
handlers:
86+
socket:
87+
level: debug
88+
type: socket
89+
formatter: monolog.formatter.json
90+
connection_string: '%env(MONOLOG_SOCKET_HOST)%'
91+
```
92+
93+
### Configuration
94+
95+
```dotenv
96+
MONOLOG_SOCKET_HOST=127.0.0.1:9913
97+
```
98+
99+
> **Note:**
100+
> Setting formatter `monolog.formatter.json` is critical. Otherwise, the Monolog server will not be able to parse the
101+
> log.
102+
78103
## Other PHP frameworks
79104

80105
Install monolog

0 commit comments

Comments
 (0)