I have structured data, key value pairs, that should be logged through syslog. In the end we want to see statistics about these metrics. How should we encode and then decode it on the reciever side?
One option that we parse the message part of the log in syslog and based on that parsing we insert it into a relational database table.
The second idea we had is to send the data in JSON and on the reciever side we treat the relational database table as a job queue, records must be parsed before inserted to a separate table.
In addition key value pairs may alter based on what we want to log.