Cisco IOS

The following will configure IOS to send the syslog messages, over UDP, to the IP Address, port 10101:

logging host transport udp port 10101

To correctly send the hostname information, it is also recommended to explicitly configure the following:

logging origin-id hostname

Otherwise the device won’t send this information.