I was working on modifying data being sent to statsd and wanted an easy way to confirm the changes in my development environment. What I needed was a fake statsd server that would just log what it was receiving.
One simple way to do that is netcat:
nc -u -l 8125
With this netcat will listen on UDP port 8125, the default statsd port, and write what ever it receives to stdout.
This solution hits the sweet spot. It did exactly the job I needed, in an easy to understand way, using a tool I already had installed. Doesn’t get much better than that.