[dovecot-cvs] dovecot/src/lib failures.c, 1.37, 1.38 failures.h, 1.11, 1.12

tss at dovecot.org tss at dovecot.org
Sun Mar 18 03:53:21 EET 2007


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

Modified Files:
	failures.c failures.h 
Log Message:
Added i_set_failure_prefix()



Index: failures.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/failures.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- failures.c	15 Mar 2007 15:51:58 -0000	1.37
+++ failures.c	18 Mar 2007 01:53:19 -0000	1.38
@@ -364,8 +364,7 @@
 
 void i_set_failure_file(const char *path, const char *prefix)
 {
-	i_free(log_prefix);
-	log_prefix = i_strdup(prefix);
+	i_set_failure_prefix(prefix);
 
 	if (log_info_fd != NULL && log_info_fd != log_fd &&
 	    log_info_fd != stderr)
@@ -380,6 +379,12 @@
 	i_set_warning_handler(NULL);
 }
 
+void i_set_failure_prefix(const char *prefix)
+{
+	i_free(log_prefix);
+	log_prefix = i_strdup(prefix);
+}
+
 static int __attr_format__(2, 0)
 internal_handler(char log_type, const char *format, va_list args)
 {

Index: failures.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/failures.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- failures.h	15 Feb 2007 14:25:28 -0000	1.11
+++ failures.h	18 Mar 2007 01:53:19 -0000	1.12
@@ -58,6 +58,9 @@
    functions modify the info file too, so call this function after them. */
 void i_set_info_file(const char *path);
 
+/* Set the failure prefix. This is used only when logging to a file. */
+void i_set_failure_prefix(const char *prefix);
+
 /* Prefix failures with a timestamp. fmt is in strftime() format. */
 void i_set_failure_timestamp_format(const char *fmt);
 



More information about the dovecot-cvs mailing list