# Help with Logstash s3 output plugin refactoring (Feature Request #215)

**URL:** <https://discuss.elastic.co/t/help-with-logstash-s3-output-plugin-refactoring-feature-request-215/239141>\
**Category:** Logstash\
**Created:** [June 29, 2020, 3:22pm UTC](https://discuss.elastic.co/t/help-with-logstash-s3-output-plugin-refactoring-feature-request-215/239141 "2020-06-29T15:22:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![byoungman](https://avatars.discourse-cdn.com/v4/letter/b/838e76/32.png) [@byoungman](https://discuss.elastic.co/u/byoungman)\
**Post date:** [June 29, 2020, 3:22pm UTC](https://discuss.elastic.co/t/help-with-logstash-s3-output-plugin-refactoring-feature-request-215/239141/1 "2020-06-29T15:22:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 27, 2020, 3:22pm UTC](https://discuss.elastic.co/t/help-with-logstash-s3-output-plugin-refactoring-feature-request-215/239141/2 "2020-07-27T15:22:47Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
