The GNU C library provides functions to submit messages to the Syslog facility:
These functions only work to submit messages to the Syslog facility on
the same system. To submit a message to the Syslog facility on another
system, use the socket I/O functions to write a UDP datagram to the
syslog
UDP port on that system. See Sockets.