Commit 2d1d2581 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Use instance name (-n) or "varnishd" for syslog identifier.

Log under facility LOCAL0



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2772 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent fac7d335
......@@ -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 @@ 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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment