dovecot-2.0: Log debug-level messages with i_debug().

dovecot at dovecot.org dovecot at dovecot.org
Fri Oct 16 19:08:17 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/62b37dcf173e
changeset: 10082:62b37dcf173e
user:      Pascal Volk <user at localhost.localdomain.org>
date:      Fri Oct 16 13:01:19 2009 +0000
description:
Log debug-level messages with i_debug().

diffstat:

32 files changed, 167 insertions(+), 167 deletions(-)
src/auth/auth-client-connection.c               |   18 ++++----
src/auth/auth-master-connection.c               |    8 +--
src/auth/auth-request.c                         |    2 
src/auth/db-passwd-file.c                       |    4 -
src/auth/passdb.c                               |    2 
src/auth/userdb-ldap.c                          |    8 +--
src/auth/userdb-prefetch.c                      |    2 
src/lib-auth/auth-master.c                      |    2 
src/lib-auth/auth-server-connection.c           |    2 
src/lib-lda/mail-send.c                         |    8 +--
src/lib-storage/index/maildir/maildir-storage.c |   14 +++---
src/lib-storage/index/mbox/mbox-storage.c       |   32 +++++++--------
src/lib-storage/mail-namespace.c                |   16 +++----
src/lib-storage/mail-storage-service.c          |   10 ++--
src/lib-storage/mailbox-list.c                  |   28 ++++++-------
src/login-common/client-common-auth.c           |    2 
src/plugins/acl/acl-backend-vfile.c             |   11 ++---
src/plugins/acl/acl-backend.c                   |    6 +-
src/plugins/acl/acl-lookup-dict.c               |    4 -
src/plugins/acl/acl-storage.c                   |    2 
src/plugins/autocreate/autocreate-plugin.c      |   12 ++---
src/plugins/convert/convert-plugin.c            |    2 
src/plugins/expire/expire-plugin.c              |   12 ++---
src/plugins/fts-lucene/fts-backend-lucene.c     |    2 
src/plugins/fts-squat/fts-backend-squat.c       |    2 
src/plugins/fts/fts-storage.c                   |    2 
src/plugins/lazy-expunge/lazy-expunge-plugin.c  |    4 -
src/plugins/quota/quota-dict.c                  |    4 -
src/plugins/quota/quota-fs.c                    |   48 +++++++++++------------
src/plugins/quota/quota-storage.c               |    2 
src/plugins/quota/quota.c                       |   45 ++++++++++-----------
src/plugins/trash/trash-plugin.c                |   18 ++++----

diffs (truncated from 982 to 300 lines):

diff -r 1120a013da33 -r 62b37dcf173e src/auth/auth-client-connection.c
--- a/src/auth/auth-client-connection.c	Thu Oct 15 22:26:03 2009 -0400
+++ b/src/auth/auth-client-connection.c	Fri Oct 16 13:01:19 2009 +0000
@@ -64,8 +64,8 @@ static void auth_client_send(struct auth
 	}
 
 	if (conn->auth->set->debug) {
-		i_info("client out: %s", conn->auth->set->debug_passwords ?
-		       cmd : reply_line_hide_pass(cmd));
+		i_debug("client out: %s", conn->auth->set->debug_passwords ?
+			cmd : reply_line_hide_pass(cmd));
 	}
 }
 
@@ -123,7 +123,7 @@ auth_client_input_cpid(struct auth_clien
 
 	conn->pid = pid;
 	if (conn->auth->set->debug)
-		i_info("new auth connection: pid=%u", conn->pid);
+		i_debug("new auth connection: pid=%u", conn->pid);
 	return TRUE;
 }
 
@@ -172,18 +172,18 @@ auth_client_handle_line(struct auth_clie
 {
 	if (strncmp(line, "AUTH\t", 5) == 0) {
 		if (conn->auth->set->debug) {
-			i_info("client in: %s",
-			       conn->auth->set->debug_passwords ? line :
-			       auth_line_hide_pass(line));
+			i_debug("client in: %s",
+				conn->auth->set->debug_passwords ? line :
+				auth_line_hide_pass(line));
 		}
 		return auth_request_handler_auth_begin(conn->request_handler,
 						       line + 5);
 	}
 	if (strncmp(line, "CONT\t", 5) == 0) {
 		if (conn->auth->set->debug) {
-			i_info("client in: %s",
-			       conn->auth->set->debug_passwords ? line :
-			       cont_line_hide_pass(line));
+			i_debug("client in: %s",
+				conn->auth->set->debug_passwords ? line :
+				cont_line_hide_pass(line));
 		}
 		return auth_request_handler_auth_continue(conn->request_handler,
 							  line + 5);
diff -r 1120a013da33 -r 62b37dcf173e src/auth/auth-master-connection.c
--- a/src/auth/auth-master-connection.c	Thu Oct 15 22:26:03 2009 -0400
+++ b/src/auth/auth-master-connection.c	Fri Oct 16 13:01:19 2009 +0000
@@ -54,7 +54,7 @@ void auth_master_request_callback(struct
 	reply_str = auth_stream_reply_export(reply);
 
 	if (conn->auth->set->debug)
-		i_info("master out: %s", reply_str);
+		i_debug("master out: %s", reply_str);
 
 	iov[0].iov_base = reply_str;
 	iov[0].iov_len = strlen(reply_str);
@@ -181,7 +181,7 @@ user_callback(enum userdb_result result,
 	}
 
 	if (conn->auth->set->debug)
-		i_info("master out: %s", str_c(str));
+		i_debug("master out: %s", str_c(str));
 
 	str_append_c(str, '\n');
 	(void)o_stream_send(conn->output, str_data(str), str_len(str));
@@ -240,7 +240,7 @@ pass_callback(enum passdb_result result,
 	}
 
 	if (conn->auth->set->debug)
-		i_info("master out: %s", str_c(str));
+		i_debug("master out: %s", str_c(str));
 
 	str_append_c(str, '\n');
 	(void)o_stream_send(conn->output, str_data(str), str_len(str));
@@ -381,7 +381,7 @@ auth_master_input_line(struct auth_maste
 auth_master_input_line(struct auth_master_connection *conn, const char *line)
 {
 	if (conn->auth->set->debug)
-		i_info("master in: %s", line);
+		i_debug("master in: %s", line);
 
 	if (strncmp(line, "USER\t", 5) == 0)
 		return master_input_user(conn, line + 5);
diff -r 1120a013da33 -r 62b37dcf173e src/auth/auth-request.c
--- a/src/auth/auth-request.c	Thu Oct 15 22:26:03 2009 -0400
+++ b/src/auth/auth-request.c	Fri Oct 16 13:01:19 2009 +0000
@@ -1449,7 +1449,7 @@ void auth_request_log_debug(struct auth_
 
 	va_start(va, format);
 	T_BEGIN {
-		i_info("%s", get_log_str(auth_request, subsystem, format, va));
+		i_debug("%s", get_log_str(auth_request, subsystem, format, va));
 	} T_END;
 	va_end(va);
 }
diff -r 1120a013da33 -r 62b37dcf173e src/auth/db-passwd-file.c
--- a/src/auth/db-passwd-file.c	Thu Oct 15 22:26:03 2009 -0400
+++ b/src/auth/db-passwd-file.c	Fri Oct 16 13:01:19 2009 +0000
@@ -202,8 +202,8 @@ static bool passwd_file_open(struct pass
 	i_stream_destroy(&input);
 
 	if (pw->db->debug) {
-		i_info("passwd-file %s: Read %u users",
-		       pw->path, hash_table_count(pw->users));
+		i_debug("passwd-file %s: Read %u users",
+			pw->path, hash_table_count(pw->users));
 	}
 	return TRUE;
 }
diff -r 1120a013da33 -r 62b37dcf173e src/auth/passdb.c
--- a/src/auth/passdb.c	Thu Oct 15 22:26:03 2009 -0400
+++ b/src/auth/passdb.c	Fri Oct 16 13:01:19 2009 +0000
@@ -113,7 +113,7 @@ bool passdb_get_credentials(struct auth_
 					       auth_request->realm, NULL);
 		}
 		if (auth_request->auth->set->debug_passwords) {
-			auth_request_log_info(auth_request, "password",
+			auth_request_log_debug(auth_request, "password",
 				"Generating %s from user '%s', password '%s'",
 				wanted_scheme, username, plaintext);
 		}
diff -r 1120a013da33 -r 62b37dcf173e src/auth/userdb-ldap.c
--- a/src/auth/userdb-ldap.c	Thu Oct 15 22:26:03 2009 -0400
+++ b/src/auth/userdb-ldap.c	Fri Oct 16 13:01:19 2009 +0000
@@ -201,10 +201,10 @@ userdb_ldap_iterate_init(struct auth_use
 	request->request.attributes = conn->iterate_attr_names;
 
 	if (userdb->auth->set->debug) {
-		i_info("ldap: iterate: base=%s scope=%s filter=%s fields=%s",
-		       conn->set.base, conn->set.scope, request->request.filter,
-		       attr_names == NULL ? "(all)" :
-		       t_strarray_join(attr_names, ","));
+		i_debug("ldap: iterate: base=%s scope=%s filter=%s fields=%s",
+			conn->set.base, conn->set.scope,
+			request->request.filter, attr_names == NULL ? "(all)" :
+			t_strarray_join(attr_names, ","));
 	}
 	request->request.request.callback = userdb_ldap_iterate_callback;
 	db_ldap_request(conn, &request->request.request);
diff -r 1120a013da33 -r 62b37dcf173e src/auth/userdb-prefetch.c
--- a/src/auth/userdb-prefetch.c	Thu Oct 15 22:26:03 2009 -0400
+++ b/src/auth/userdb-prefetch.c	Fri Oct 16 13:01:19 2009 +0000
@@ -28,7 +28,7 @@ static void prefetch_lookup(struct auth_
 		} else if (!auth_request->userdb_lookup ||
 			   auth_request->auth->set->debug) {
 			/* more userdbs, they may know the user */
-			auth_request_log_info(auth_request, "prefetch",
+			auth_request_log_debug(auth_request, "prefetch",
 				"passdb didn't return userdb entries, "
 				"trying the next userdb");
 		}
diff -r 1120a013da33 -r 62b37dcf173e src/lib-auth/auth-master.c
--- a/src/lib-auth/auth-master.c	Thu Oct 15 22:26:03 2009 -0400
+++ b/src/lib-auth/auth-master.c	Fri Oct 16 13:01:19 2009 +0000
@@ -130,7 +130,7 @@ static void auth_parse_input(struct auth
 	reply->user = p_strdup(ctx->pool, *args);
 	for (args++; *args != NULL; args++) {
 		if (ctx->conn->debug)
-			i_info("auth input: %s", *args);
+			i_debug("auth input: %s", *args);
 
 		if (strncmp(*args, "uid=", 4) == 0)
 			reply->uid = strtoul(*args + 4, NULL, 10);
diff -r 1120a013da33 -r 62b37dcf173e src/lib-auth/auth-server-connection.c
--- a/src/lib-auth/auth-server-connection.c	Thu Oct 15 22:26:03 2009 -0400
+++ b/src/lib-auth/auth-server-connection.c	Fri Oct 16 13:01:19 2009 +0000
@@ -202,7 +202,7 @@ auth_server_connection_input_line(struct
 	const char *const *args;
 
 	if (conn->client->debug)
-		i_info("auth input: %s", line);
+		i_debug("auth input: %s", line);
 
 	args = t_strsplit(line, "\t");
 	if (strcmp(args[0], "OK") == 0)
diff -r 1120a013da33 -r 62b37dcf173e src/lib-lda/mail-send.c
--- a/src/lib-lda/mail-send.c	Thu Oct 15 22:26:03 2009 -0400
+++ b/src/lib-lda/mail-send.c	Fri Oct 16 13:01:19 2009 +0000
@@ -83,8 +83,8 @@ int mail_send_rejection(struct mail_deli
     }
 
     if (mailbox_get_settings(mail->box)->mail_debug) {
-	    i_info("Sending a rejection to %s: %s", recipient,
-		   str_sanitize(reason, 512));
+	    i_debug("Sending a rejection to %s: %s", recipient,
+		    str_sanitize(reason, 512));
     }
 
     smtp_client = smtp_client_open(ctx->set, return_addr, NULL, &f);
@@ -188,8 +188,8 @@ int mail_send_forward(struct mail_delive
 
     return_path = mail_deliver_get_return_address(ctx);
     if (mailbox_get_settings(ctx->src_mail->box)->mail_debug) {
-	    i_info("Sending a forward to <%s> with return path <%s>",
-		   forwardto, return_path);
+	    i_debug("Sending a forward to <%s> with return path <%s>",
+		    forwardto, return_path);
     }
 
     smtp_client = smtp_client_open(ctx->set, forwardto, return_path, &f);
diff -r 1120a013da33 -r 62b37dcf173e src/lib-storage/index/maildir/maildir-storage.c
--- a/src/lib-storage/index/maildir/maildir-storage.c	Thu Oct 15 22:26:03 2009 -0400
+++ b/src/lib-storage/index/maildir/maildir-storage.c	Fri Oct 16 13:01:19 2009 +0000
@@ -165,17 +165,17 @@ maildir_storage_find_root_dir(const stru
 		path = t_strconcat(home, "/Maildir", NULL);
 		if (access(path, R_OK|W_OK|X_OK) == 0) {
 			if (debug)
-				i_info("maildir: root exists (%s)", path);
+				i_debug("maildir: root exists (%s)", path);
 			return path;
 		} 
 		if (debug)
-			i_info("maildir: access(%s, rwx): failed: %m", path);
+			i_debug("maildir: access(%s, rwx): failed: %m", path);
 	} else {
 		if (debug)
-			i_info("maildir: Home directory not set");
+			i_debug("maildir: Home directory not set");
 		if (access("/cur", R_OK|W_OK|X_OK) == 0) {
 			if (debug)
-				i_info("maildir: /cur exists, assuming chroot");
+				i_debug("maildir: /cur exists, assuming chroot");
 			return "/";
 		}
 	}
@@ -195,7 +195,7 @@ static bool maildir_storage_autodetect(c
 		root_dir = maildir_storage_find_root_dir(ns);
 		if (root_dir == NULL) {
 			if (debug)
-				i_info("maildir: couldn't find root dir");
+				i_debug("maildir: couldn't find root dir");
 			return FALSE;
 		}
 	}
@@ -203,13 +203,13 @@ static bool maildir_storage_autodetect(c
 	path = t_strconcat(root_dir, "/cur", NULL);
 	if (stat(path, &st) < 0) {
 		if (debug)
-			i_info("maildir autodetect: stat(%s) failed: %m", path);
+			i_debug("maildir autodetect: stat(%s) failed: %m", path);
 		return FALSE;
 	}
 
 	if (!S_ISDIR(st.st_mode)) {
 		if (debug)
-			i_info("maildir autodetect: %s not a directory", path);
+			i_debug("maildir autodetect: %s not a directory", path);
 		return FALSE;
 	}
 
diff -r 1120a013da33 -r 62b37dcf173e src/lib-storage/index/mbox/mbox-storage.c
--- a/src/lib-storage/index/mbox/mbox-storage.c	Thu Oct 15 22:26:03 2009 -0400
+++ b/src/lib-storage/index/mbox/mbox-storage.c	Fri Oct 16 13:01:19 2009 +0000
@@ -152,7 +152,7 @@ static void mbox_storage_get_list_settin
 	if (set->inbox_path == NULL) {
 		set->inbox_path = t_strconcat(set->root_dir, "/inbox", NULL);
 		if (ns->mail_set->mail_debug)
-			i_info("mbox: INBOX defaulted to %s", set->inbox_path);
+			i_debug("mbox: INBOX defaulted to %s", set->inbox_path);
 	}
 }
 
@@ -162,28 +162,28 @@ static bool mbox_is_file(const char *pat
 
 	if (stat(path, &st) < 0) {
 		if (debug) {
-			i_info("mbox autodetect: %s: stat(%s) failed: %m",
-			       name, path);
+			i_debug("mbox autodetect: %s: stat(%s) failed: %m",
+				name, path);
 		}
 		return FALSE;
 	}
 	if (S_ISDIR(st.st_mode)) {
 		if (debug) {
-			i_info("mbox autodetect: %s: is a directory (%s)",
+			i_debug("mbox autodetect: %s: is a directory (%s)",
 			       name, path);
 		}
 		return FALSE;
 	}
 	if (access(path, R_OK|W_OK) < 0) {
 		if (debug) {
-			i_info("mbox autodetect: %s: no R/W access (%s)",
+			i_debug("mbox autodetect: %s: no R/W access (%s)",
 			       name, path);
 		}
 		return FALSE;
 	}
 
 	if (debug)
-		i_info("mbox autodetect: %s: yes (%s)", name, path);
+		i_debug("mbox autodetect: %s: yes (%s)", name, path);
 	return TRUE;
 }
 


More information about the dovecot-cvs mailing list