Alright, the patch can wait a bit until this is sorted out. I will need it anyway because I want to send messages to syslog, but that leaves me some time to write the syslog library itself :)