Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

library should also accept status code 201 #114

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

library should also accept status code 201 #114

madmuffin1 opened this issue Mar 22, 2017 · 2 comments
Labels
type: enhancement A general enhancement

Comments

@madmuffin1
Copy link
Contributor

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 mp911de added the type: enhancement A general enhancement label Mar 22, 2017
@mp911de
Copy link
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 pushed a commit that referenced this issue Mar 22, 2017
@mp911de
Copy link
Owner

mp911de commented Mar 22, 2017

Closed via 2e99088.

@mp911de mp911de closed this as completed Mar 22, 2017
@mp911de mp911de added this to the logstash-gelf 1.11.1 milestone Mar 22, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants