return false;
}
- msg_debug_bayes("processing tokens for statfile id=%d, results size=%uz, class=%s",
- id, results->size(), stcf->class_name ? stcf->class_name : "unknown");
+ if (results->size() > 0) {
+ msg_debug_bayes("processing %uz tokens for statfile id=%d, class=%s",
+ results->size(), id, stcf->class_name ? stcf->class_name : "unknown");
+ }
for (auto [idx, val]: *results) {
tok = (rspamd_token_t *) g_ptr_array_index(tokens, idx - 1);
- msg_debug_bayes("setting tok->values[%d] = %.2f for token idx %d (class=%s)",
- id, val, idx, stcf->class_name ? stcf->class_name : "unknown");
tok->values[id] = val;
}
token_type = "meta";
}
- if (tok->t1 && tok->t2) {
- msg_debug_bayes("token(%s) %uL <%*s:%*s>: weight: %f, cf: %f, "
- "total_count: %ud, "
- "spam_count: %ud, ham_count: %ud,"
- "spam_prob: %.3f, ham_prob: %.3f, "
- "bayes_spam_prob: %.3f, bayes_ham_prob: %.3f, "
- "current spam probability: %.3f, current ham probability: %.3f",
- token_type,
- tok->data,
- (int) tok->t1->stemmed.len, tok->t1->stemmed.begin,
- (int) tok->t2->stemmed.len, tok->t2->stemmed.begin,
- fw, w, total_count, spam_count, ham_count,
- spam_prob, ham_prob,
- bayes_spam_prob, bayes_ham_prob,
- cl->spam_prob, cl->ham_prob);
- }
- else {
- msg_debug_bayes("token(%s) %uL <?:?>: weight: %f, cf: %f, "
- "total_count: %ud, "
- "spam_count: %ud, ham_count: %ud,"
- "spam_prob: %.3f, ham_prob: %.3f, "
- "bayes_spam_prob: %.3f, bayes_ham_prob: %.3f, "
- "current spam probability: %.3f, current ham probability: %.3f",
- token_type,
- tok->data,
- fw, w, total_count, spam_count, ham_count,
- spam_prob, ham_prob,
- bayes_spam_prob, bayes_ham_prob,
- cl->spam_prob, cl->ham_prob);
- }
+ /* Per-token debug logging removed to reduce verbosity */
}
}
cl->text_tokens++;
}
- if (tok->t1 && tok->t2) {
- msg_debug_bayes("token(%s) %uL <%*s:%*s>: weight: %.3f, total_count: %ud, "
- "processed for %ud classes",
- token_type, tok->data,
- (int) tok->t1->stemmed.len, tok->t1->stemmed.begin,
- (int) tok->t2->stemmed.len, tok->t2->stemmed.begin,
- fw, total_count, cl->num_classes);
- }
+ /* Per-token debug logging removed to reduce verbosity */
}
}