I want every server to send logs to /var/log and and copy to a remote syslog-ng server. I've heard anecdotes how logging remotely can hang your application if the network has problems. Should I be concerned about my app hanging when logging remotely, and how would I fix/work-around it?
No. For one, the handoff is asynchronous within the local operating system. syslog libraries and the local syslog daemon will either accept the message and fail to deliver it or fail-fast, but either way your app won't hang. Secondly the network protocol is (by default) udp so even if your application blocked until the packet got sent out, it would go out instantly and return control to your app regardless of if it actually makes it to the collecting host.
When people think of remote logging hanging things in *nix land its usually because they were logging to an nfs mount, which most certainly can cause hangs. Syslog, you're good.
I know it's an old message, but I'll answer if other people hit this page.
We've seen a case where remote logging make a server hang.
Syslog-ng, when losing network access to his loghost, start to buffer. And when the buffer get full, it stop reading from the