[dovecot-cvs] dovecot/src/imap main.c,1.66,1.67

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


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

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



Index: main.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/main.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- main.c	28 Oct 2005 10:57:18 -0000	1.66
+++ main.c	2 Dec 2005 12:53:25 -0000	1.67
@@ -104,9 +104,11 @@
 	}
 	i_snprintf(log_prefix, sizeof(log_prefix), "imap(%s)", user);
 
-	if (getenv("USE_SYSLOG") != NULL)
-		i_set_failure_syslog(log_prefix, LOG_NDELAY, LOG_MAIL);
-	else {
+	if (getenv("USE_SYSLOG") != NULL) {
+		const char *env = getenv("SYSLOG_FACILITY");
+		i_set_failure_syslog(log_prefix, LOG_NDELAY,
+				     env == NULL ? LOG_MAIL : atoi(env));
+	} else {
 		/* log to file or stderr */
 		i_set_failure_file(getenv("LOGFILE"), log_prefix);
 	}



More information about the dovecot-cvs mailing list