<commit_before>package tools.descartes.petsupplystore.registryclient.rest;

import java.io.IOException;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;

import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Logger;

public class TrackingFilter implements Filter {

	Logger logger = Logger.getLogger(TrackingFilter.class);
	
	@Override
	public void init(FilterConfig filterConfig) throws ServletException {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
			throws IOException, ServletException {
		BasicConfigurator.configure();
		if (request instanceof HttpServletRequest) {
			HttpServletRequest httpRequest = (HttpServletRequest) request;
			logger.info(httpRequest.getHeader("KiekerTracingInfo"));
		} else {
			logger.error("Something went wrong");
		}
		chain.doFilter(request, response);
	}

	@Override
	public void destroy() {
		// TODO Auto-generated method stub
		
	}

}<commit_msg>set logger level to Info to avoid http spam<commit_after>package tools.descartes.petsupplystore.registryclient.rest;

import java.io.IOException;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;

import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;

public class TrackingFilter implements Filter {

	Logger logger = Logger.getLogger(TrackingFilter.class);
	
	@Override
	public void init(FilterConfig filterConfig) throws ServletException {
		BasicConfigurator.configure();
		logger.setLevel(Level.INFO);
		
	}

	@Override
	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
			throws IOException, ServletException {
		if (request instanceof HttpServletRequest) {
			HttpServletRequest httpRequest = (HttpServletRequest) request;
			String trackingInfo = httpRequest.getHeader("KiekerTracingInfo");
			if (trackingInfo != null && !trackingInfo.equals(""))
				logger.info(trackingInfo);
		} else {
			logger.error("Something went wrong");
		}
		chain.doFilter(request, response);
	}

	@Override
	public void destroy() {
		// TODO Auto-generated method stub
		
	}

}
{'fraction_non_alphanumeric': 0.09069767441860466, 'fraction_numerical': 0.001937984496124031, 'mean_word_length': 5.534177215189874, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2685289', 'n_tokens_mistral': 767, 'n_tokens_neox': 714, 'n_words': 168}