Right now I have the different formats going on different ports and a series of statements in the config file. Perhaps a bad way of doing it.
In response to your questions - I am very new to this so do not know how I would wrap the message in JSON. Nor do I know how to use logstash for format detection.