Added support for UDP

Option to collect logs from TCP or UDP