logdna / logdna-agent

LogDNA Agent streams from log files to your LogDNA account. Works with Linux, Windows, and macOS Servers
https://logdna.com
MIT License
138 stars 55 forks source link

Handle 207 better #143

Closed smusali closed 5 years ago

smusali commented 5 years ago

When logdna-agent sends a batch of lines containing invalid ones, logdna-agent can't understand 207 and in order to provide visibility over the invalid lines, this Pull Request is adding debug log statements to specify which log lines are invalid.

This Pull Request also renames some variables related to requesting and/or handling responses to make more readable.

Considering logdna-agent doesn't use any transport other than http, there is no need for config.TRANSPORT variable and checks.

smusali commented 5 years ago

Updated, @dchai76 @weizou19!

dchai76 commented 5 years ago

In Phabricator land we ask for a Test Plan - how did you test this to show that the changes work. Let me ask for that here also. What did you do to test?

smusali commented 5 years ago

In Phabricator land we ask for a Test Plan - how did you test this to show that the changes work. Let me ask for that here also. What did you do to test?

So, @dchai76, well, this is very interesting question and there is no direct answer from me. Basically, the integration testing with test account is going to test this case.

Also, this is small addition to the code which is not affecting the current logflow and this small block was tested with the sample response body.

The other thing is 207 response code is temporary and going to be gone soon.