[nginx] Mail: added some parsing debug logging.

Maxim Dounin mdounin at mdounin.ru
Mon Jun 3 15:16:22 UTC 2024


details:   http://freenginx.org/hg/nginx/rev/20017bff0de8
branches:  
changeset: 9289:20017bff0de8
user:      Maxim Dounin <mdounin at mdounin.ru>
date:      Mon Jun 03 18:03:09 2024 +0300
description:
Mail: added some parsing debug logging.

diffstat:

 src/mail/ngx_mail_parse.c |  9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diffs (33 lines):

diff --git a/src/mail/ngx_mail_parse.c b/src/mail/ngx_mail_parse.c
--- a/src/mail/ngx_mail_parse.c
+++ b/src/mail/ngx_mail_parse.c
@@ -30,6 +30,9 @@ ngx_mail_pop3_parse_command(ngx_mail_ses
 
     state = s->state;
 
+    ngx_log_debug1(NGX_LOG_DEBUG_MAIL, s->connection->log, 0,
+                   "pop3 parse: %d", state);
+
     for (p = s->buffer->pos; p < s->buffer->last; p++) {
         ch = *p;
 
@@ -248,6 +251,9 @@ ngx_mail_imap_parse_command(ngx_mail_ses
 
     state = s->state;
 
+    ngx_log_debug1(NGX_LOG_DEBUG_MAIL, s->connection->log, 0,
+                   "imap parse: %d", state);
+
     for (p = s->buffer->pos; p < s->buffer->last; p++) {
         ch = *p;
 
@@ -692,6 +698,9 @@ ngx_mail_smtp_parse_command(ngx_mail_ses
 
     state = s->state;
 
+    ngx_log_debug1(NGX_LOG_DEBUG_MAIL, s->connection->log, 0,
+                   "smtp parse: %d", state);
+
     for (p = s->buffer->pos; p < s->buffer->last; p++) {
         ch = *p;
 



More information about the nginx-devel mailing list