Geal / rust-syslog

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

feat: support message ids as strings #82

Open ctrlaltf24 opened 6 months ago

ctrlaltf24 commented 6 months ago

MSGID examples in rfc 5424 are strings

For example, a firewall might use the MSGID "TCPIN" for incoming TCP traffic and the MSGID "TCPOUT" for outgoing TCP traffic.

  • rfc 5424

Unsure how you want to handle validating the message_id's input. The current implementation has the easiest to interact with API boundary, but at the cost of runtime cycles.

message id is likely a constant possibly called many times, we could add an option to run the validation once using a wrapper type, then use it safely per call