fluent / fluent-package-builder

td-agent (Fluentd) Building and Packaging System
Apache License 2.0
22 stars 26 forks source link

Use out_secondary_file for secondary output #486

Closed daipom closed 1 year ago

daipom commented 1 year ago

To solve the warning message:

Use different plugin for secondary ...
daipom commented 1 year ago

This will change the output path as follows:

If this change is unacceptable, then we should not make this change.

daipom commented 1 year ago

This will change the output path as follows:

* before: `/var/log/td-agent/failed_records_0.log`

* after: `/var/log/td-agent/failed_records/dump.bin.0`

If this change is unacceptable, then we should not make this change.

Note: out_secondary_file can't output the files with the same format as out_file. Even if we use basename as follows, the path will be like /var/log/td-agent/failed_records.0.

    <secondary>
      @type secondary_file
      directory /var/log/td-agent
      basename failed_records
    </secondary>
daipom commented 1 year ago

Oh, sorry. We need to fix it too. Thanks for your review. I will fix it and confirm the behavior on each platform.

daipom commented 1 year ago
daipom commented 1 year ago
daipom commented 1 year ago

Sorry, I forgot to point out a thing. Could you modify also fluent-package/templates/opt/fluent/share/td-agent.conf.tmpl?

By #525, we don't need to manage td-agent.conf.tmpl anymore. I will check the package default behavior in some platforms after the CI completed

daipom commented 1 year ago

Rebased to solve conflicts.

daipom commented 1 year ago

I confirmed the actual logs of msi and rpm. In addition, I added the tests for each platform to confirm the log files.

ashie commented 1 year ago

Thanks!

daipom commented 1 year ago

Thanks for your review!