Simple logging to UDP/TCP socket

In addition to logging to stdout/stderr, I need to send log messages to a UDP socket (localhost). I avoided using a logging framework so far (kind of hard to choose for me).
what would you recommend to use if my requirements are very low (no fancy logging features needed) but the UDP/TCP use case is important?
would be nice if such an implementation would take care of queuing and buffering to a certain extent.