diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-06-02 13:12:10 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-06-02 13:12:10 +0100 |
commit | f30fa3d32c2635e8cbc93dadb713a8ad74007d52 (patch) | |
tree | 9d5a161cf01d32908de47eb51a0a9234bdda2677 /src/libmime | |
parent | ed574e92254bcf9994aae909707c66371659fddc (diff) | |
download | rspamd-f30fa3d32c2635e8cbc93dadb713a8ad74007d52.tar.gz rspamd-f30fa3d32c2635e8cbc93dadb713a8ad74007d52.zip |
[Minor] Improve logging
Diffstat (limited to 'src/libmime')
-rw-r--r-- | src/libmime/mime_encoding.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/libmime/mime_encoding.c b/src/libmime/mime_encoding.c index a44eb755c..5b67aec65 100644 --- a/src/libmime/mime_encoding.c +++ b/src/libmime/mime_encoding.c @@ -460,8 +460,16 @@ rspamd_mime_text_part_utf8_convert (struct rspamd_task *task, return FALSE; } - msg_info_task ("converted from %s to UTF-8 inlen: %d, outlen: %d (%d UTF16 chars)", - charset, input->len, r, uc_len); + if (text_part->mime_part && text_part->mime_part->ct) { + msg_info_task ("converted text part from %s ('%T' announced) to UTF-8 inlen: %d, outlen: %d (%d UTF16 chars)", + charset, &text_part->mime_part->ct->charset, input->len, r, uc_len); + } + else { + msg_info_task ("converted text part from %s (no charset announced) to UTF-8 inlen: %d, " + "outlen: %d (%d UTF16 chars)", + charset, input->len, r, uc_len); + } + text_part->utf_raw_content = rspamd_mempool_alloc (task->task_pool, sizeof (*text_part->utf_raw_content) + sizeof (gpointer) * 4); text_part->utf_raw_content->data = d; |