-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MSG isn't validated #18
Comments
We could also replace the message field in type t by a tuple, record or even a new type to accommodate for the tag and content field. This would break the API, but afaik the only consumer of this library is logs-syslog at the moment. If @hannesm is fine with it, this might be an option to raising an exception. |
I think this would be preferable, since exceptions tend to be rather surprising and break your code on runtime. The other possibility is to use the |
I'm happy with a (breaking) API change :) and I don't expect that this |
…rbosemode#18 use rresult and result types (instead of option)
see #20 |
extend type t to contain tag and message (both type string), fixes #18
RFC3164 4.1.3 describes the two fields of the
MSG
portion, but this isn't validated anywhere. In principle, theencode
function should probably raise if there is no discernable alphanumericTAG
of 32 chars or fewer delimited by a non-alphanumeric character inmessage
.The text was updated successfully, but these errors were encountered: