<commit_before>/*
 *  The OpenDiamond Platform for Interactive Search
 *  Version 5
 *
 *  Copyright (c) 2009 Carnegie Mellon University
 *  All rights reserved.
 *
 *  This software is distributed under the terms of the Eclipse Public
 *  License, Version 1.0 which can be found in the file named LICENSE.
 *  ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS SOFTWARE CONSTITUTES
 *  RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT
 */

package edu.cmu.cs.diamond.opendiamond;

import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;

class LoggingFramework {

	XMLLogger searchLogger;
	Logger javaLogger;

	LoggingFramework(String logMessage) {
		try {
			this.searchLogger = new XMLLogger();
			this.javaLogger = this.searchLogger.getSearchLogger();
			this.javaLogger.log(Level.FINEST, "Initializing new LoggingFramework for a new search.", logMessage);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	void shutdown() {
		javaLogger.log(Level.FINEST, "Shutting down logging framework.");
		searchLogger.shutdown(null);
	}

	void saveFilters(List<Filter> filters) {
		for (Filter f : filters) {
			javaLogger.log(Level.FINEST, "Saving filters.", searchLogger.saveFilter(f));
		}
	}

	void saveAttributes(Set<String> desiredAttributes) {
		javaLogger.log(Level.FINEST, "Saving attributes.", searchLogger.saveAttributes(desiredAttributes));
	}

	void saveSessionVariables(Map<String, Double> sessionVariables) {<commit_msg>Updated logged message to match the action more appropriately.<commit_after>/*
 *  The OpenDiamond Platform for Interactive Search
 *  Version 5
 *
 *  Copyright (c) 2009 Carnegie Mellon University
 *  All rights reserved.
 *
 *  This software is distributed under the terms of the Eclipse Public
 *  License, Version 1.0 which can be found in the file named LICENSE.
 *  ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS SOFTWARE CONSTITUTES
 *  RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT
 */

package edu.cmu.cs.diamond.opendiamond;

import java.io.IOException;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;

class LoggingFramework {

	XMLLogger searchLogger;
	Logger javaLogger;

	LoggingFramework(String logMessage) {
		try {
			this.searchLogger = new XMLLogger();
			this.javaLogger = this.searchLogger.getSearchLogger();
			this.javaLogger.log(Level.FINEST, "Initializing new LoggingFramework for a new search.", logMessage);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	void shutdown() {
		javaLogger.log(Level.FINEST, "Shutting down logging framework.");
		searchLogger.shutdown(null);
	}

	void saveFilters(List<Filter> filters) {
		for (Filter f : filters) {
			javaLogger.log(Level.FINEST, "Saving filter.", searchLogger.saveFilter(f));
		}
	}

	void saveAttributes(Set<String> desiredAttributes) {
		javaLogger.log(Level.FINEST, "Saving attributes.", searchLogger.saveAttributes(desiredAttributes));
	}

	void saveSessionVariables(Map<String, Double> sessionVariables) {
{'fraction_non_alphanumeric': 0.10012554927809166, 'fraction_numerical': 0.004394224733207784, 'mean_word_length': 4.591228070175439, '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': '11232', 'n_tokens_mistral': 1038, 'n_tokens_neox': 958, 'n_words': 268}