<commit_before>package com.celements.mandatory;

import java.util.Map;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.xwiki.component.annotation.Component;
import org.xwiki.component.annotation.Requirement;
import org.xwiki.context.Execution;

import com.celements.common.classes.CompositorComponent;
import com.xpn.xwiki.XWikiContext;
import com.xpn.xwiki.XWikiException;

@Component
public class MandatoryDocumentCompositor implements IMandatoryDocumentCompositorRole {

  private static Log LOGGER = LogFactory.getFactory().getInstance(
      CompositorComponent.class);
  
  @Requirement
  private Map<String, IMandatoryDocumentRole> mandatoryDocuemntsMap;

  @Requirement
  private Execution execution;

  protected XWikiContext getContext() {
    return (XWikiContext)execution.getContext().getProperty("xwikicontext");
  }

  public void checkAllMandatoryDocuments() {
    LOGGER.debug("checkAllMandatoryDocuments for wiki [" + "].");
    for (IMandatoryDocumentRole mandatoryDoc : mandatoryDocuemntsMap.values()) {
      try {
        mandatoryDoc.checkDocuments();
      } catch (XWikiException exp) {
        LOGGER.error("Exception checking mandatory documents for component "
            + mandatoryDoc.getClass(), exp);
      }
    }
  }

}<commit_msg>fix logging in MandatoryDocumentCompositor<commit_after>package com.celements.mandatory;

import java.util.Map;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.xwiki.component.annotation.Component;
import org.xwiki.component.annotation.Requirement;
import org.xwiki.context.Execution;

import com.celements.common.classes.CompositorComponent;
import com.xpn.xwiki.XWikiContext;
import com.xpn.xwiki.XWikiException;

@Component
public class MandatoryDocumentCompositor implements IMandatoryDocumentCompositorRole {

  private static Log LOGGER = LogFactory.getFactory().getInstance(
      CompositorComponent.class);
  
  @Requirement
  private Map<String, IMandatoryDocumentRole> mandatoryDocuemntsMap;

  @Requirement
  private Execution execution;

  protected XWikiContext getContext() {
    return (XWikiContext)execution.getContext().getProperty("xwikicontext");
  }

  public void checkAllMandatoryDocuments() {
    LOGGER.info("checkAllMandatoryDocuments for wiki [" + "].");
    for (IMandatoryDocumentRole mandatoryDoc : mandatoryDocuemntsMap.values()) {
      try {
        mandatoryDoc.checkDocuments();
      } catch (XWikiException exp) {
        LOGGER.error("Exception checking mandatory documents for component "
            + mandatoryDoc.getClass(), exp);
      }
    }
  }

}
{'fraction_non_alphanumeric': 0.09405568096313018, 'fraction_numerical': 0.0, 'mean_word_length': 4.755411255411255, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '680132', 'n_tokens_mistral': 779, 'n_tokens_neox': 765, 'n_words': 141}