remote_syslog2
remote_syslog2 copied to clipboard
Add support for multiple logging destinations
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.
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 This was the first approach I came up with, could you give some example on how the suggested field would be used?