File tree Expand file tree Collapse file tree 1 file changed +17
-9
lines changed Expand file tree Collapse file tree 1 file changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -79,15 +79,23 @@ LOG_SOCKET_URL=127.0.0.1:9913
7979
8080Here is an example of how to configure Monolog to send logs to Buggregator in Symfony.
8181
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)%'
82+ ``` php
83+ # config/packages/dev/monolog.php
84+ <?php
85+
86+ namespace Symfony\Component\DependencyInjection\Loader\Configurator;
87+
88+ use Symfony\Config\MonologConfig;
89+
90+ return static function (MonologConfig $monologConfig): void {
91+ $monologConfig
92+ ...
93+ ->handler('socket')
94+ ->level('debug')
95+ ->formatter('monolog.formatter.json')
96+ ->type('socket')
97+ ->connectionString(env('MONOLOG_SOCKET_HOST'));
98+ };
9199```
92100
93101### Configuration
You can’t perform that action at this time.
0 commit comments