From: phk Date: Sun, 22 Jun 2008 12:15:11 +0000 (+0000) Subject: Use instance name (-n) or "varnishd" for syslog identifier. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af58f9d49043843e937be28d9539348ecc3d938f;p=varnish Use instance name (-n) or "varnishd" for syslog identifier. Log under facility LOCAL0 git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2772 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/varnishd.c b/varnish-cache/bin/varnishd/varnishd.c index e0d14ae0..0780bf38 100644 --- a/varnish-cache/bin/varnishd/varnishd.c +++ b/varnish-cache/bin/varnishd/varnishd.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -506,6 +507,11 @@ main(int argc, char *argv[]) exit(1); } + if (n_arg != NULL) + openlog(n_arg, LOG_PID, LOG_LOCAL0); + else + openlog("varnishd", LOG_PID, LOG_LOCAL0); + if (mkdir(dirname, 0755) < 0 && errno != EEXIST) { fprintf(stderr, "Cannot create working directory '%s': %s\n", dirname, strerror(errno));