graylog-labs / gelf-rb

Ruby GELF library (Graylog Extended Log Format)
https://rubygems.org/gems/gelf
MIT License
153 stars 104 forks source link

fixes chunking for subclasses of GELF::Notifier #15

Closed barooo closed 11 years ago

barooo commented 11 years ago

To subclass GELF::Notifier and be able to use chunking, you have to explicitly initialize last_chunk_id. It looks to me like this variable belongs to GELF::Notifier, and using the explicit class name instead of self.class makes it work correctly when subclassed.

If I've misunderstood the scope of last_chunk_id, I'll modify my site's usage to correctly initialize.

barooo commented 11 years ago

The second commit reverts the tests back to what was there earlier; I initially bumped up the size of the data being sent while I was investigating and never set it back to 3000, which I should have done before submitting the PR.

lennartkoopmann commented 11 years ago

Thank you very much! The failing test is caused by something else and was broken before already. (Ruby 2.0 compatibility problem only in the test code that I will address tomorrow)

barooo commented 11 years ago

And I didn't see a failing test because I'm on 1.9.3. :)

lennartkoopmann commented 11 years ago

But Travis-CI sees everything! :) https://travis-ci.org/Graylog2/gelf-rb/builds/10992306