remote_syslog2 icon indicating copy to clipboard operation
remote_syslog2 copied to clipboard

Add support for multiple logging destinations

Open aenbacka opened this issue 3 years ago • 2 comments

This pull request adds support for (optionally) logging to multiple syslog destinations.

The optional destinations need to be defined in the configuration file, e.g.,

destination: host: some_host port: 12345 protocol: tls token: some_token destination1: host: some_host2 port: 67890 protocol: tls token: some_token destination2: ...

The implementation supports optional destinations indexed from 1 to maxDestinationIndex (currently max 10 optional destinations).

The change is fully backwards-compatible, i.e., we always process the 'destination' config element (and the command-line destination parameter overrides the config file 'destination', as previously).

Also update the tests to use the new internal format.

aenbacka avatar Feb 07 '22 08:02 aenbacka

Would it not make more sense to just have a new destinations field and mention that destination takes over to keep it backward compatible as well? Curious to know what are your thoughts.

scalp42 avatar Feb 07 '22 08:02 scalp42

@scalp42 This was the first approach I came up with, could you give some example on how the suggested field would be used?

aenbacka avatar Feb 07 '22 09:02 aenbacka