[GH-ISSUE #285] Update the GELF handler/formatter #94

Closed
opened 2026-03-04 02:12:08 +03:00 by kerem · 3 comments
Owner

Originally created by @bzikarsky on GitHub (Dec 17, 2013).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/285

Last summer I wrote a php-gelf library with multiple goals:

  • Possibility to use as standalone PSR-3 logger
  • Higher flexibility for transports besides UDP
  • Test-coverage
  • PSR[0-3] compatibility

The result can be found at https://github.com/bzikarsky/gelf-php and is based upon f @lennartkoopmann's original Graylog2/gelf-php.

I'd be happy to also provide an updated GelfHandler/GelfFormatter for monolog if there is interest/use for it. It would be a one-time dependency break since IMessagePublisher and Message don't exist in the updated version.

Originally created by @bzikarsky on GitHub (Dec 17, 2013). Original GitHub issue: https://github.com/Seldaek/monolog/issues/285 Last summer I wrote a php-gelf library with multiple goals: - Possibility to use as standalone PSR-3 logger - Higher flexibility for transports besides UDP - Test-coverage - PSR[0-3] compatibility The result can be found at https://github.com/bzikarsky/gelf-php and is based upon f @lennartkoopmann's original Graylog2/gelf-php. I'd be happy to also provide an updated GelfHandler/GelfFormatter for monolog if there is interest/use for it. It would be a one-time dependency break since IMessagePublisher and Message don't exist in the updated version.
kerem closed this issue 2026-03-04 02:12:08 +03:00
Author
Owner

@Seldaek commented on GitHub (Dec 18, 2013):

Sounds good for monolog 2.0 depending on what it means for the code on our side. If you'd like to do a PR already feel free, but I am not sure when it'll be merged.

<!-- gh-comment-id:30862063 --> @Seldaek commented on GitHub (Dec 18, 2013): Sounds good for monolog 2.0 depending on what it means for the code on our side. If you'd like to do a PR already feel free, but I am not sure when it'll be merged.
Author
Owner

@tomzx commented on GitHub (Jan 28, 2015):

Isn't this done already? Can this issue be closed?

Under monolog @ 1.12.0 and graylog2/gelf-php @ 1.1.1 (from @bzikarsky), I do the following without issue.

$monolog->pushHandler(new GelfHandler(new Publisher(new HttpTransport('myserver.com', 12201))));
<!-- gh-comment-id:71909098 --> @tomzx commented on GitHub (Jan 28, 2015): Isn't this done already? Can this issue be closed? Under `monolog` @ 1.12.0 and `graylog2/gelf-php` @ 1.1.1 (from @bzikarsky), I do the following without issue. ``` php $monolog->pushHandler(new GelfHandler(new Publisher(new HttpTransport('myserver.com', 12201)))); ```
Author
Owner

@Seldaek commented on GitHub (Jan 29, 2015):

Yup I missed this, thanks

<!-- gh-comment-id:72002230 --> @Seldaek commented on GitHub (Jan 29, 2015): Yup I missed this, thanks
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/monolog#94
No description provided.