[dovecot-cvs] dovecot/src/auth main.c,1.21,1.22

cras at procontrol.fi cras at procontrol.fi
Mon May 10 19:05:11 EEST 2004


Update of /home/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv10665/auth

Modified Files:
	main.c 
Log Message:
Write all logging through master process. Fixes problems with log rotation,
chrooting, etc. Master process also allows max. 10 log messages per second
per child process, it then begins throttling them (eventually making the
child process start blocking on stderr).



Index: main.c
===================================================================
RCS file: /home/cvs/dovecot/src/auth/main.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- main.c	22 Aug 2003 02:42:13 -0000	1.21
+++ main.c	10 May 2004 16:05:09 -0000	1.22
@@ -41,25 +41,9 @@
 	}
 }
 
-static void open_logfile(void)
-{
-	if (getenv("USE_SYSLOG") != NULL)
-		i_set_failure_syslog("dovecot-auth", LOG_NDELAY, LOG_MAIL);
-	else {
-		/* log to file or stderr */
-		i_set_failure_file(getenv("LOGFILE"), "dovecot-auth");
-	}
-
-	if (getenv("INFOLOGFILE") != NULL)
-		i_set_info_file(getenv("INFOLOGFILE"));
-
-	i_set_failure_timestamp_format(getenv("LOGSTAMP"));
-}
-
 static void drop_privileges(void)
 {
-	/* Log file or syslog opening probably requires roots */
-	open_logfile();
+	i_set_failure_internal();
 
 	/* Open /dev/urandom before chrooting */
 	random_init();



More information about the dovecot-cvs mailing list