Skip to content

@attachments should allow sprintf values #34

@wiibaa

Description

@wiibaa

As found by a user https://discuss.elastic.co/t/dynamic-attachments-to-email-output/41559

the @attachments configuration does not compute sprintf values, this is obvious when looking at the code
https://github.com/logstash-plugins/logstash-output-email/blob/v3.0.2/lib/logstash/outputs/email.rb#L135-L137

Current mail.add_file(fileLocation) should become mail.add_file(event.sprintf(fileLocation))

This needs (maybe my own reminder if I found time for a PR)

  • Fix
  • Test
  • Documentation update

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions