<commit_before>package org.basex.server;

import static org.basex.core.Text.*;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.basex.core.Prop;
import org.basex.io.IO;

/**
 * Management of logging.
 *
 * @author Workgroup DBIS, University of Konstanz 2005-09, ISC License
 * @author <NAME>
 */
public class Log {
  /** Log folder checker. */
  private IO logdir;
  /** Daily log file. */
  private File logfile;
  /** Date. */
  private Date d = new Date();
  /** BufferedWriter. */
  private BufferedWriter bw;

  /**
   * Constructor.
   */
  public Log() {
    logdir = IO.get(Prop.HOME + "\\BaseXLogs");
    if(!logdir.exists()) {
      new File(Prop.HOME + "\\BaseXLogs").mkdir();
    }
    DateFormat df = DateFormat.getDateInstance(2);
    logfile = new File(Prop.HOME + "\\BaseXLogs\\" +
        df.format(d) + ".log");
    if(!logfile.exists()) {
        try {
          logfile.createNewFile();
        } catch(IOException e) {
          e.printStackTrace();
        }
    }
    try {
      bw = new BufferedWriter(new FileWriter(logfile, true));
    } catch(IOException e) {
      e.printStackTrace();
    }
  }

  /**
   * Writes into the logfile.
   * @param s String
   */
  public void write(final String s) {
    try {
      d = new Date();
      SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss.SSS");
      String tmp = sdf.format(d) + " : " + s + NL;
      bw.write(tmp); 
    } catch(IOException e) {
      e.printStackTrace();
    }
  }
  
  /**
   * Closes the log.
   */
  public void closeLog() {
    try {
      bw.close();
    } catch(IOException e) {
      e.printStackTrace();
    }
  }
}
<commit_msg>new log date format<commit_after>package org.basex.server;

import static org.basex.core.Text.*;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.basex.core.Prop;
import org.basex.io.IO;

/**
 * Management of logging.
 *
 * @author Workgroup DBIS, University of Konstanz 2005-09, ISC License
 * @author <NAME>
 */
public class Log {
  /** Log folder checker. */
  private IO logdir;
  /** Daily log file. */
  private File logfile;
  /** Date. */
  private Date d = new Date();
  /** BufferedWriter. */
  private BufferedWriter bw;

  /**
   * Constructor.
   */
  public Log() {
    logdir = IO.get(Prop.HOME + "\\BaseXLogs");
    if(!logdir.exists()) {
      new File(Prop.HOME + "\\BaseXLogs").mkdir();
    }
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
    logfile = new File(Prop.HOME + "\\BaseXLogs\\" +
        sdf.format(d) + ".log");
    if(!logfile.exists()) {
        try {
          logfile.createNewFile();
        } catch(IOException e) {
          e.printStackTrace();
        }
    }
    try {
      bw = new BufferedWriter(new FileWriter(logfile, true));
    } catch(IOException e) {
      e.printStackTrace();
    }
  }

  /**
   * Writes into the logfile.
   * @param s String
   */
  public void write(final String s) {
    try {
      d = new Date();
      SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss.SSS");
      String tmp = sdf.format(d) + " : " + s + NL;
      bw.write(tmp); 
    } catch(IOException e) {
      e.printStackTrace();
    }
  }
  
  /**
   * Closes the log.
   */
  public void closeLog() {
    try {
      bw.close();
    } catch(IOException e) {
      e.printStackTrace();
    }
  }
}

{'fraction_non_alphanumeric': 0.1461065025421461, 'fraction_numerical': 0.0034787262510034785, 'mean_word_length': 2.0564186426819298, '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': '641183', 'n_tokens_mistral': 1251, 'n_tokens_neox': 1219, 'n_words': 274}