logstash-plugins / logstash-output-google_cloud_storage

Apache License 2.0
9 stars 26 forks source link

Synchronized Log Rotation and Invariant #31

Closed josephlewis42 closed 6 years ago

josephlewis42 commented 6 years ago

This PR abstracts away the details of log rotation and file management from the main google_cloud_storage.rb file.

It breaks duties into three components:

LogRotate keeps a strict invariant that it will always have exactly one log file open per plugin instance. This will fix #2, and fix #19.

rosbo commented 6 years ago

Question on the general approach, if you use multiple pipelines, does it share the same running process of this plugin? If that's the case, should the invariant be "exactly one log file open per pipeline"?

josephlewis42 commented 6 years ago

@rosbo you're correct, it'll be one open file per plugin instance.