[dovecot-cvs] dovecot/src/auth main.c,1.49,1.50

cras at dovecot.org cras at dovecot.org
Fri Dec 2 14:53:23 EET 2005


Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv7925/src/auth

Modified Files:
	main.c 
Log Message:
Added syslog_facility setting to config file.



Index: main.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/main.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- main.c	28 Oct 2005 10:57:19 -0000	1.49
+++ main.c	2 Dec 2005 12:53:21 -0000	1.50
@@ -45,14 +45,18 @@
 
 static void open_logfile(void)
 {
+	const char *env;
+
 	if (getenv("LOG_TO_MASTER") != NULL) {
 		i_set_failure_internal();
 		return;
 	}
 
-	if (getenv("USE_SYSLOG") != NULL)
-		i_set_failure_syslog("dovecot-auth", LOG_NDELAY, LOG_MAIL);
-	else {
+	if (getenv("USE_SYSLOG") != NULL) {
+		env = getenv("SYSLOG_FACILITY");
+		i_set_failure_syslog("dovecot-auth", LOG_NDELAY,
+				     env == NULL ? LOG_MAIL : atoi(env));
+	} else {
 		/* log to file or stderr */
 		i_set_failure_file(getenv("LOGFILE"), "dovecot-auth");
 	}



More information about the dovecot-cvs mailing list