<commit_before>//
// $Id: AuditLogger.java,v 1.2 2003/08/04 21:03:09 ray Exp $

package com.samskivert.util;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;

import java.text.SimpleDateFormat;
import java.text.FieldPosition;

import java.util.Calendar;
import java.util.Date;

import com.samskivert.Log;

/**
 * Used by various services to generate audit logs which can be useful for
 * auditing, debugging and other logly necessities. The audit logger
 * automatically rolls over its logs at midnight to facilitate the
 * collection, processing and possible archiving of the logs.
 */
public class AuditLogger
    implements Interval
{
    /**
     * Creates an audit logger that logs to the specified file.
     */
    public AuditLogger (File path, String filename)
    {
        _logPath = new File(path, filename);<commit_msg>Allow construction from just a File.<commit_after>//
// $Id: AuditLogger.java,v 1.3 2003/09/12 02:31:14 ray Exp $

package com.samskivert.util;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;

import java.text.SimpleDateFormat;
import java.text.FieldPosition;

import java.util.Calendar;
import java.util.Date;

import com.samskivert.Log;

/**
 * Used by various services to generate audit logs which can be useful for
 * auditing, debugging and other logly necessities. The audit logger
 * automatically rolls over its logs at midnight to facilitate the
 * collection, processing and possible archiving of the logs.
 */
public class AuditLogger
    implements Interval
{
    /**
     * Creates an audit logger that logs to the specified file.
     */
    public AuditLogger (File path, String filename)
    {
        this(new File(path, filename));
    }

    /**
     * Creates an audit logger that logs to the specified file.
     */
    public AuditLogger (File fullpath)
    {
        _logPath = fullpath;
{'fraction_non_alphanumeric': 0.08644501278772379, 'fraction_numerical': 0.016368286445012786, 'mean_word_length': 3.4759725400457664, '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': '937573', 'n_tokens_mistral': 587, 'n_tokens_neox': 563, 'n_words': 205}