<commit_before>package net.ssehub.kernel_haven.util;

import static net.ssehub.kernel_haven.util.null_checks.NullHelpers.notNull;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;

import net.ssehub.kernel_haven.SetUpException;
import net.ssehub.kernel_haven.config.Configuration;
import net.ssehub.kernel_haven.config.DefaultSettings;
import net.ssehub.kernel_haven.util.null_checks.NonNull;
import net.ssehub.kernel_haven.util.null_checks.Nullable;

/**
 * A thread-safe singleton logger.
 * 
 * @author adam
 * @author alice
 * @author moritz
 */
public class Logger {
    
    /**
     * Enum of the available log levels.
     */
    public static enum Level {
        ERROR("error", 0),
        WARNING("warning", 1),
        INFO("info", 2),
        DEBUG("debug", 3);
        
        private @NonNull String str;
        
        private int level;
        
        /**<commit_msg>Add NONE level to Logger<commit_after>package net.ssehub.kernel_haven.util;

import static net.ssehub.kernel_haven.util.null_checks.NullHelpers.notNull;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;

import net.ssehub.kernel_haven.SetUpException;
import net.ssehub.kernel_haven.config.Configuration;
import net.ssehub.kernel_haven.config.DefaultSettings;
import net.ssehub.kernel_haven.util.null_checks.NonNull;
import net.ssehub.kernel_haven.util.null_checks.Nullable;

/**
 * A thread-safe singleton logger.
 * 
 * @author adam
 * @author alice
 * @author moritz
 */
public class Logger {
    
    /**
     * Enum of the available log levels.
     */
    public static enum Level {
        NONE("none", -1),
        ERROR("error", 0),
        WARNING("warning", 1),
        INFO("info", 2),
        DEBUG("debug", 3);
        
        private @NonNull String str;
        
        private int level;
        
        /**
{'fraction_non_alphanumeric': 0.11223087494273935, 'fraction_numerical': 0.004122766834631242, 'mean_word_length': 3.1839080459770117, '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': '5386153', 'n_tokens_mistral': 706, 'n_tokens_neox': 672, 'n_words': 144}