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

library should also accept status code 201 #114

Closed
madmuffin1 opened this Issue Mar 22, 2017 · 2 comments

Comments

2 participants
@madmuffin1
Contributor

madmuffin1 commented Mar 22, 2017

Hi,

we're happily using this library to send our logs to a managed logging service using HTTP. This logging service apparently implemented the HTTP receipt of the message differently than this library expects it.

This library requires the HTTP service to respond with a 202 (see biz.paluch.logging.gelf.intern.sender.GelfHTTPSender#L63,) but they send a 201 CREATED.

As it is a managed service, we cannot change its behavior. Actually everything is working ok, but logstash-gelf kind of spams our logs, these two lines will be produced for every single log message sent:

14:14:53,747 |-ERROR in biz.paluch.logging.gelf.logback.GelfLogbackAppender[GELF] - Server responded with unexpected status code: 201
14:14:53,749 |-ERROR in biz.paluch.logging.gelf.logback.GelfLogbackAppender[GELF] - Could not send GELF message

I would happily help out and work on a PR, but would like to know which solution you prefer:

a) generally allow 201
b) make this configurable

Cheers

@mp911de

This comment has been minimized.

Owner

mp911de commented Mar 22, 2017

Let's accept all codes in the range between 200 and 299. Adding another config option makes introduces additional complexity and only little benefit.

madmuffin1 added a commit to madmuffin1/logstash-gelf that referenced this issue Mar 22, 2017

madmuffin1 added a commit to madmuffin1/logstash-gelf that referenced this issue Mar 22, 2017

mp911de added a commit that referenced this issue Mar 22, 2017

@mp911de

This comment has been minimized.

Owner

mp911de commented Mar 22, 2017

Closed via 2e99088.

@mp911de mp911de closed this Mar 22, 2017

@mp911de mp911de added this to the logstash-gelf 1.11.1 milestone Mar 22, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment