Closed leodido closed 6 years ago
I should have done everything you mentioned @goller :)
Please notice that the builder here introduced is simply an initial version.
The idea is to create a builder capable to build SyslogMessage
valid instances, capable to serialize each of them in a string as per RFC5424. Doing this we can make fields private.
Anyway to do such a builder I intend to exploit the ragel pieces (but I'll need a modularization of the ragel machine). This way only valid (syntactically and semantically in some cases) inputs will be accepted.
It is possible to achieve this, I already done a preliminary try about this. But it is out of the scope of this PR.
I think this code is in a good state now. But waiting for my friend @goller to review it.