File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,41 @@ return [
6868
6969```
7070
71+ ### DatadogHandler
72+
73+ You can adding following block into ` config/logging.php ` .
74+
75+ ``` php
76+ use Monolog\Formatter\JsonFormatter;
77+ use Onramplab\LaravelLogEnhancement\Handlers\DatadogHandler;
78+
79+ return [
80+ //...
81+
82+ 'channels' => [
83+ //...
84+
85+ 'datadog' => [
86+ 'driver' => 'monolog',
87+ 'level' => 'info',
88+ 'handler' => DatadogHandler::class,
89+ 'handler_with' => [
90+ 'key' => env('DD_LOG_API_KEY'),
91+ 'region' => env('DD_LOG_REGION', 'us5'),
92+ 'attributes' => [
93+ 'hostname' => gethostname(),
94+ 'source' => env('DD_LOG_SOURCE', 'laravel'),
95+ 'service' => env('DD_LOG_SERVICE'),
96+ 'tags' => env('DD_LOG_TAG'),
97+ ],
98+ ],
99+ 'formatter' => JsonFormatter::class,
100+ ],
101+ ]
102+ ];
103+
104+ ```
105+
71106## Testing
72107
73108Run the tests with:
You can’t perform that action at this time.
0 commit comments