Geal / rust-syslog

Send syslog messages from Rust
MIT License
109 stars 55 forks source link

Make formatter5424 deterministic for strutured data serialization #62

Closed dgouarin closed 1 month ago

dgouarin commented 2 years ago

This formatter uses a HashMap for storing the structured data attached to an event. As the default HashMap randomizes the hash, the sd parameters come out in a random order in the syslogged event. This can be annoying for an event parser, or even for the human eye. Perhaps it would be better to sort the keys alphabetically in format_5424_structured_data ?

Geal commented 1 month ago

fixed in https://github.com/Geal/rust-syslog/commit/278bfceb0ebc2eb9828c0f910027b5c13d092e91