-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP Appender #30
Comments
Hi, There were no plans in doing a GelfHttpAppender, but I think it sound really well, I was thinking about that when graylog announced the HttpInput (I believe it was two years ago) http://docs.graylog.org/en/1.2/pages/sending_data.html#gelf-via-http but didn't have the time and I didn't need it so I let it pass by. But it sound really interesting. I'll try to make a first version during the day. I'm thinking in using the source code of https://github.com/statianzo/PostLog or inherit from https://logging.apache.org/log4net/release/config-examples.html |
Hi. Well I didn't extend I didn't want to use RestSharp or HttpClient libraries, because didn't want to add more dependencies, amqp and json.net are already embedded in the library... So, what do you think about the implementation with WebClient? I had a "weird" problem related to this http://haacked.com/archive/2004/05/15/http-web-request-expect-100-continue.aspx/ Anyway. well, i'll wait to release this appender..... |
@jjchiw how does the WebClient performance compare against the HttpClient? Furthermore, WebClient is not thread safe, if there is only one appender created, this appender is likely to have deadlocks. I also note that you have wrapped If I was implementing this I would use HttpClient it is thread safe for some methods. If you didn't want to add another dependency you could structure you project to have multiple nuget packages with a shared core library. You could then release a gelf4net.Http package that has the HTTP Client dependencies without adding those dependencies to the main nuget package. |
Hi! I found this thread in StackOverflow about WebClient and HttpClient it seems
About that WebClient is not thread safe, I don't see anything about that in the msdn just found this
That it's the same as System.Net.HttpClient
This was a first draft, I'll look in create new nuget packages and separate udp and amqp and http.....just have to shared the gelflayout.... |
Ah ok. So the method is Async, but not actually Async (awaitable). That is weird. From what I have seen of The latest version of the docs for HttpClient outline which methods are thread safe. |
I'll change I'll also create a package named I think It'll be done during the weekend. :) |
Ok, I think it's done I separated the projects and Can you check it? All the changes are in this branch https://github.com/jjchiw/gelf4net/tree/httpappender I'll upload the new packages during the week. :) |
@jjchiw Looks heaps better to me. I have a couple of comments. When you create the headers, The more important question is about |
Yes about the About |
Fantastic. Thank you so much for working on this. Do you have a nuget package for this? As a side note, if you're not doing continuous builds, I could highly recommend AppVeyor. |
Hi! I thought that AppVeyor was only paying, but I see there is an option for OpenSource projects, I will check it later, it seems it has a lot of configurations... Just uploaded the new packages and merge the branch with master
:) |
We have applications deployed in networks outside the network the Graylog instance is deployed into. We also don't have control over the firewall rules. The only real option seems to be logging via HTTP(s) as these ports are guaranteed to be open.
Are there any plans to add a GelfHTTPAppender? Do you see any issues with this?
The text was updated successfully, but these errors were encountered: