[codeface] [PATCH 22/26] Enhance log message for removed mail reference id lines

  • From: Claus Hunsen <hunsen@xxxxxxxxxxxxxxxxx>
  • To: codeface@xxxxxxxxxxxxx
  • Date: Thu, 13 Oct 2016 17:29:54 +0200

From: Thomas Bock <bockthom@xxxxxxxxxxxxxxxxx>

To enhance the logging output of Codeface mailing list analysis, the logging 
output of the number of removed reference id lines is enhanced by the message 
id of the regarding mail.

Signed-off-by: Thomas Bock <bockthom@xxxxxxxxxxxxxxxxx>
---
 codeface/R/ml/analysis.r | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/codeface/R/ml/analysis.r b/codeface/R/ml/analysis.r
index 0ee1efb..17d3f11 100644
--- a/codeface/R/ml/analysis.r
+++ b/codeface/R/ml/analysis.r
@@ -208,11 +208,12 @@ check.corpus.precon <- function(corp.base) {
                       header <- meta(doc, tag="header")
 
                       if(length(rmv.lines) != 0) {
-                        ## Log number of removed reference id lines
+                        ## Log number of removed reference id lines and 
message id
+                        message.id <- meta(doc, tag="id")
                         msg <- sprintf(paste("Removing %d id references",
                                              "from corpus due to precondition",
-                                             "violation(s)", sep=" "),
-                                       length(rmv.lines))
+                                             "violation(s) while checking 
message %s", sep=" "),
+                                       length(rmv.lines), message.id)
                         loginfo(msg, logger="ml.analysis")
                         header <- header[-rmv.lines]
                       }
-- 
2.10.0


Other related posts: