r2772 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Sun Jun 22 14:15:11 CEST 2008
Author: phk
Date: 2008-06-22 14:15:11 +0200 (Sun, 22 Jun 2008)
New Revision: 2772
Modified:
trunk/varnish-cache/bin/varnishd/varnishd.c
Log:
Use instance name (-n) or "varnishd" for syslog identifier.
Log under facility LOCAL0
Modified: trunk/varnish-cache/bin/varnishd/varnishd.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/varnishd.c 2008-06-22 11:50:39 UTC (rev 2771)
+++ trunk/varnish-cache/bin/varnishd/varnishd.c 2008-06-22 12:15:11 UTC (rev 2772)
@@ -45,6 +45,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <syslog.h>
#include <time.h>
#include <unistd.h>
@@ -506,6 +507,11 @@
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));
More information about the varnish-commit
mailing list