<commit_before>package jj;

import java.util.Iterator;

import org.jboss.netty.logging.InternalLoggerFactory;
import org.jboss.netty.logging.Slf4JLoggerFactory;
import org.slf4j.LoggerFactory;

import ch.qos.logback.classic.AsyncAppender;
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.Logger;
import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.Appender;

/**
 * ensures that all logging is done through an async appender.
 * TODO - make this smarter, of course but for now it works
 * @author jason
 *
 */
class SLF4JConfiguration implements JJShutdown {

	private final Logger logger = (Logger)LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
	
	private final LoggerContext context = (LoggerContext)LoggerFactory.getILoggerFactory();
	
	private final AsyncAppender asyncAppender;
	
	SLF4JConfiguration() {
		
		asyncAppender = new AsyncAppender();
		asyncAppender.setContext(context);
		
		Iterator<Appender<ILoggingEvent>> i = logger.iteratorForAppenders();
		while (i.hasNext()) {
			Appender<ILoggingEvent> appender = i.next();
			logger.detachAppender(appender);
			appender.setContext(context);
			asyncAppender.addAppender(appender);
		}
		
		asyncAppender.start();
		
		logger.addAppender(asyncAppender);
		
		// make sure netty logs to our log
		InternalLoggerFactory.setDefaultFactory(new Slf4JLoggerFactory());
		
		// shutting up the logging in our dependencies by default
		((Logger)LoggerFactory.getLogger("com")).setLevel(Level.ERROR);
		((Logger)LoggerFactory.getLogger("org")).setLevel(Level.ERROR);
	}

	@Override
	public void stop() {
		asyncAppender.stop();
	}
}<commit_msg>turning on trace by default<commit_after>package jj;

import java.util.Iterator;

import org.jboss.netty.logging.InternalLoggerFactory;
import org.jboss.netty.logging.Slf4JLoggerFactory;
import org.slf4j.LoggerFactory;

import ch.qos.logback.classic.AsyncAppender;
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.Logger;
import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.Appender;

/**
 * ensures that all logging is done through an async appender.
 * TODO - make this smarter, of course but for now it works
 * @author jason
 *
 */
class SLF4JConfiguration implements JJShutdown {

	private final Logger logger = (Logger)LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
	
	private final LoggerContext context = (LoggerContext)LoggerFactory.getILoggerFactory();
	
	private final AsyncAppender asyncAppender;
	
	SLF4JConfiguration() {
		
		asyncAppender = new AsyncAppender();
		asyncAppender.setContext(context);
		
		Iterator<Appender<ILoggingEvent>> i = logger.iteratorForAppenders();
		while (i.hasNext()) {
			Appender<ILoggingEvent> appender = i.next();
			logger.detachAppender(appender);
			appender.setContext(context);
			asyncAppender.addAppender(appender);
		}
		
		asyncAppender.start();
		
		logger.addAppender(asyncAppender);
		
		// make sure netty logs to our log
		InternalLoggerFactory.setDefaultFactory(new Slf4JLoggerFactory());
		
		// shutting up the logging in our dependencies by default
		((Logger)LoggerFactory.getLogger("com")).setLevel(Level.ERROR);
		((Logger)LoggerFactory.getLogger("org")).setLevel(Level.ERROR);
		
		((Logger)LoggerFactory.getLogger("jj")).setLevel(Level.TRACE);
	}

	@Override
	public void stop() {
		asyncAppender.stop();
	}
}
{'fraction_non_alphanumeric': 0.11059640995946729, 'fraction_numerical': 0.0028951939779965257, 'mean_word_length': 5.169642857142857, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '4942599', 'n_tokens_mistral': 1187, 'n_tokens_neox': 1079, 'n_words': 217}