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

udp and openvpn #45

Closed amarmain closed 1 year ago

amarmain commented 1 year ago

Laravel version: 10.13.0 hedii/laravel-gelf-logger version: 8.0.1

Can you add the possibility to set the third parameter of UdpTransport class?

public function __construct( string $host = self::DEFAULT_HOST, int $port = self::DEFAULT_PORT, private int $chunkSize = self::CHUNK_SIZE_WAN )

If the message is too long (backtrace), the message is not send to my graylog server.

Here are some explanation about the MTU issue with OpenVpn:

https://github.com/bzikarsky/gelf-php/issues/117#issuecomment-518946816

If I override this line from GelfLoggerFactory.php file, I can receive the message to my graylog server:

default => new UdpTransport($host, $port, 1200),

instead of

default => new UdpTransport($host, $port),

hedii commented 1 year ago

Hi, yes i will add it as soon as i have time to write it. Thanks!

amarmain commented 1 year ago

Thanks for your help!