I am working on refactoring logstash-output-s3 plugin so that it handles custom filenames (Feature Request #215) and I am running into an issue that has become a blocker for me and that is the refactored plugin honors the time_size tag but not the file_size tag.
Specifically the problem lies in this call / code block:
@logger.info("Rotation of tempfile: ", :temp_file => temp_file) //debug info my own
if @rotation.rotate?(temp_file)
@logger.info("Rotate file",
:strategy => @rotation.class.name,
:key => temp_file.key,
:path => temp_file.path)
upload_file(temp_file)
factory.rotate!
end
This is being called when I don't pass in a custom filename but let the plugin assign the default ls.s3.xxx pattern to the file however this block does not get called when passing in a custom filename.
Note: I have noticed that there is an intermittent issue where even though there is a custom filename being built the plugin will still assign the default pattern. Was wondering if this could be causing the issue.
I am new to Ruby so this has been a great learning experience however if I can pass this last hurtle then I can submit the update to the github repository for release in a future plugin update.
TIA,
Bill