Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't set hostname with the unix backend
The UNIX socket specific initialization functions `init_unix()` and `init_unix_custom()` take care of not setting the hostname in the header. This is based on the assumption that a syslog relay will set the appropriate hostname (see PR #7). The generic initialization function `init()` that supports UNIX, UDP and TCP sockets does set the hostname unconditionally though. Users of this API end up with an extra hostname being added to their logs, as seen with virtiofsd for example : Jan 12 17:03:04 myhostname virtiofsd[70727]: myhostname virtiofsd[70725]: Waiting for vhost-user socket connection... Only set the hostname for UDP and TCP. Signed-off-by: Greg Kurz <groug@kaod.org>
- Loading branch information