mattwcole / gelf-extensions-logging

GELF provider for Microsoft.Extensions.Logging
MIT License
109 stars 42 forks source link

Add support for HTTP(S) Graylog endpoints #13

Closed mersadk closed 6 years ago

mersadk commented 6 years ago

Hi,

From what I can see this only supports UDP endpoints. It would be nice to have support for HTTP(S) endpoints as well. If you are willing to merge it, I can create pull request for that.

mattwcole commented 6 years ago

I think this would be a great addition. A new implementation of IGelfClient should do the job. Feel free to put a PR up, however I've got a small tweak to make to the dev branch after the last PR was merged that should be done first. I will be able to push it tonight when I am home from work.

mersadk commented 6 years ago

Great, just let me know when you're done and I'll create PR.

mersadk commented 6 years ago

Wrong button, sorry :/

mattwcole commented 6 years ago

All done!

mersadk commented 6 years ago

I've created pull request.

I've added HttpGelfClient and modified unit tests to test both UDP and HTTP. I didn't update readme file.

To use HTTP/HTTPS host in settings needs to start with http://... and it will recognize it needs to use HttpGelfClient. If Graylog input is running on some custom port, port should be included in host name with :{port}. Stand-alone port setting is ignored for HTTP.

mattwcole commented 6 years ago

This is released now as v1.4.0-pre1! Stable release coming soon.