Send your data to your TCP input

Sending the log to logstash with openssl over TLS

echo "Simple message over TCP" | openssl s_client -connect your-logstash-host:your-port

Sending the log to logstash with netcat without TLS (This is not recommened for production)

echo "Simple message over TCP" | nc your-logstash-host your-port