hedii / laravel-gelf-logger

A package to send gelf logs to a gelf compatible backend like graylog
MIT License
125 stars 33 forks source link

Add extra data to the gelf messages #43

Closed hocrattot closed 1 year ago

hocrattot commented 1 year ago

Hi there,

I am currently using Laravel 10 and laravel-gelf-logger 8.0.1 and have some hard times trying to have a custom processor able to add extra information to the gelf message.

When I have this it is all good, the message is sent to my graylog server :

image

But when I add more data in the array like below, then nothing is sent to the server :

image

Any idea of the reason ?

Thanks

hedii commented 1 year ago

No idea, there's no reason from the code you shared, it looks ok.

Try adding the single log driver to a laravel log stack just before the gelf driver, so that you may see an error logged to storage/log/laravel.log

'stack' => [
        'driver' => 'stack',
        'channels' => ['single', 'gelf'],
    ],

You may also have an issue with your graylog server.

I am closing this issue because I cannot reproduce your problem. If you write a test showing that something does not work as intended, please reopen a new one and submit a PR.