<commit_before>/**
 * 
 */
package fr.esiea.CanadianLoggerjack.impl;

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

import fr.esiea.CanadianLoggerjack.Formator;

/**
 * Displays the date / time, the name of the logger, the message level error and the message.
 *
 */
public class DefaultFormator implements Formator {

	/* (non-Javadoc)
	 * @see fr.esiea.CanadianLumberjack.Formateur#formatError(java.lang.String)
	 */
	
	private String loggerName;
	
	DefaultFormator(String loggerName){
		this.loggerName = loggerName;
	}
	@Override
	public String formatError(String message) {
		return formatCommon(message, "ERROR");
	}

	/* (non-Javadoc)
	 * @see fr.esiea.CanadianLumberjack.Formateur#formatInfo(java.lang.String)
	 */
	@Override
	public String formatInfo(String message) {
		return formatCommon(message, "INFO");
	}

	/* (non-Javadoc)
	 * @see fr.esiea.CanadianLumberjack.Formateur#formatDebug(java.lang.String)
	 */
	@Override
	public String formatDebug(String message) {
		return formatCommon(message, "DEBUG");
	}
	
	private String formatCommon(String message, String errorLevel){
		String date;
		date = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(new Date()).toString();
		return(date + "\t" + this.loggerName + "\t" + errorLevel + "\t" + message);
	}

}<commit_msg>Mise à jour de la javadoc<commit_after>/**
 * 
 */
package fr.esiea.CanadianLoggerjack.impl;

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

import fr.esiea.CanadianLoggerjack.Formator;

/**
 * Displays the date / time, the name of the logger, the message level error and the message.
 *
 */
public class DefaultFormator implements Formator {
	
	private String loggerName;
	
	/**
	 * Create a formator, with the name of the logger
	 * @param loggerName The name of the logger
	 */
	DefaultFormator(String loggerName){
		this.loggerName = loggerName;
	}
	
	/**
	 * Return the format for the error level 'ERROR'
	 * @param message The message to display
	 */
	@Override
	public String formatError(String message) {
		return formatCommon(message, "ERROR");
	}
	
	/**
	 * Return the format for the error level 'INFO'
	 * @param message The message to display
	 */
	@Override
	public String formatInfo(String message) {
		return formatCommon(message, "INFO");
	}

	/**
	 * Return the format for the error level 'DEBUG'
	 * @param message The message to display
	 */
	@Override
	public String formatDebug(String message) {
		return formatCommon(message, "DEBUG");
	}
	
	/**
	 * Return the format for the error in parameter
	 * @param message The message to display
	 * @param errorLevel The error level of the message
	 */
	private String formatCommon(String message, String errorLevel){
		String date;
		date = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(new Date()).toString();
		return(date + "\t" + this.loggerName + "\t" + errorLevel + "\t" + message);
	}

}
{'fraction_non_alphanumeric': 0.11838440111420613, 'fraction_numerical': 0.0, 'mean_word_length': 4.067019400352733, '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': '2656092', 'n_tokens_mistral': 949, 'n_tokens_neox': 864, 'n_words': 256}