<commit_before>package me.nallar.tickthreading;

import java.io.PrintWriter;
import java.io.StringWriter;
import java.text.SimpleDateFormat;
import java.util.logging.Formatter;
import java.util.logging.Level;
import java.util.logging.LogRecord;

public class LogFormatter extends Formatter {
	static final String LINE_SEPARATOR = System.getProperty("line.separator");
	private final SimpleDateFormat dateFormat = new SimpleDateFormat("MM-dd HH:mm:ss");
	private int writtenSize = 0;

	public static void setFormat(boolean u, SimpleDateFormat dateFormat) {
	}

	@Override
	public String format(LogRecord record) {
		StringBuilder formattedMessage = new StringBuilder();
		formattedMessage.append(dateFormat.format(record.getMillis()));
		Level level = record.getLevel();

		String name = level.getLocalizedName();
		if (name == null) {
			name = level.getName();
		}

		formattedMessage.append(" [").append(name == null ? "" : name).append("] ");

		String loggerName = record.getLoggerName();
		formattedMessage
				.append('[').append(loggerName == null ? "" : loggerName).append("] ")
				.append(record.getMessage()).append(LINE_SEPARATOR);
<commit_msg>Always use uppercase english name for log levels, for consistency so that searching for people with the same error is easier.<commit_after>package me.nallar.tickthreading;

import java.io.PrintWriter;
import java.io.StringWriter;
import java.text.SimpleDateFormat;
import java.util.logging.Formatter;
import java.util.logging.Level;
import java.util.logging.LogRecord;

public class LogFormatter extends Formatter {
	static final String LINE_SEPARATOR = System.getProperty("line.separator");
	private final SimpleDateFormat dateFormat = new SimpleDateFormat("MM-dd HH:mm:ss");
	private int writtenSize = 0;

	public static void setFormat(boolean u, SimpleDateFormat dateFormat) {
	}

	@Override
	public String format(LogRecord record) {
		StringBuilder formattedMessage = new StringBuilder();
		formattedMessage.append(dateFormat.format(record.getMillis()));
		Level level = record.getLevel();

		String name = level.getName().toUpperCase();

		formattedMessage.append(" [").append(name == null ? "" : name).append("] ");

		String loggerName = record.getLoggerName();
		formattedMessage
				.append('[').append(loggerName == null ? "" : loggerName).append("] ")
				.append(record.getMessage()).append(LINE_SEPARATOR);

{'fraction_non_alphanumeric': 0.12289562289562289, 'fraction_numerical': 0.0008417508417508417, 'mean_word_length': 5.53021978021978, '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': '3309675', 'n_tokens_mistral': 714, 'n_tokens_neox': 667, 'n_words': 165}