<commit_before>package edu.wustl.cab2b.server.queryengine.resulttransformers;

import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Date;

import javax.xml.namespace.QName;

import org.apache.log4j.Logger;

import gov.nih.nci.cagrid.common.Utils;
import gov.nih.nci.cagrid.cqlquery.CQLQuery;
import gov.nih.nci.cagrid.dcql.DCQLQuery;

/**
 * Logs CQL and DCQL under {user.home}/cab2bQueries.<br>
 * If the base log folder {user.home}/cab2bQueries doesn't exist, it is created
 * in a static initializer. Each logger notes the time when it was instantiated
 * (to the precision of a second), and creates a folder under the base log
 * folder that contains this timestamp in its name. An example is <br>
 * C:\Documents and Settings\srinath_k\cab2bQueries\4 Sep 2007 01_13_06 PM.
 * 
 * @author srinath_k
 * 
 */
public class QueryLogger {
    private static final Logger logger = edu.wustl.common.util.logger.Logger.getLogger(QueryLogger.class);
    private static final String LOG_BASE_DIR = System.getProperty("user.home") + "/cab2bQueries";

    private static final SimpleDateFormat dateFormat = new SimpleDateFormat("d MMM yyyy hh_mm_ss a");

    private static final String LOG_FILE_NAME_PREFIX = "query_";
<commit_msg>Changed the folder name format<commit_after>package edu.wustl.cab2b.server.queryengine.resulttransformers;

import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Date;

import javax.xml.namespace.QName;

import org.apache.log4j.Logger;

import gov.nih.nci.cagrid.common.Utils;
import gov.nih.nci.cagrid.cqlquery.CQLQuery;
import gov.nih.nci.cagrid.dcql.DCQLQuery;

/**
 * Logs CQL and DCQL under {user.home}/cab2bQueries.<br>
 * If the base log folder {user.home}/cab2bQueries doesn't exist, it is created
 * in a static initializer. Each logger notes the time when it was instantiated
 * (to the precision of a second), and creates a folder under the base log
 * folder that contains this timestamp in its name. An example is <br>
 * C:\Documents and Settings\srinath_k\cab2bQueries\4 Sep 2007 01_13_06 PM.
 * 
 * @author srinath_k
 * 
 */
public class QueryLogger {
    private static final Logger logger = edu.wustl.common.util.logger.Logger.getLogger(QueryLogger.class);

    private static final String LOG_BASE_DIR = System.getProperty("user.home") + "/cab2bQueries";

    private static final SimpleDateFormat dateFormat = new SimpleDateFormat("dMMMyyyy_hh_mm_ss_a");

    private static final String LOG_FILE_NAME_PREFIX = "query_";

{'fraction_non_alphanumeric': 0.0950479233226837, 'fraction_numerical': 0.013578274760383386, 'mean_word_length': 4.566666666666666, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '3145440', 'n_tokens_mistral': 856, 'n_tokens_neox': 826, 'n_words': 232}