<commit_before><?php
// LOGGING
define('DEBUG_LOG', dirname(__FILE__) . "/../Logs/Debugger");

class Debugger{		
    private $debugLog;
    
    public function __construct() {
        $this->debugLog = DEBUG_LOG . date("-Y-m-d") . ".txt";
    }	
	
	/**
	* Appends the sql error to the end of the file ($this->file)
    */		
	public function debug($class, $method, $msg){
	    
		$message = "($class->$method) $msg";		
		$this->debugger($message);
	}
	
	/**
	* Appends the sql error to the end of the file ($this->file)
    */		
	public function debugger($msg){
		$message = "\n" . date("m/d/y h:i:s") . " - " . $msg;
		
		$file = fopen($this->debugLog,"a");
		fwrite($file, $message);
		fclose($file);
	}
}<commit_msg>Fixing issue with Debugger controller<commit_after><?php
require_once(dirname(__FILE__) . '/../globals.php');

// LOGGING
define('DEBUG_LOG', dirname(__FILE__) . "/../Logs/Debugger");

class Debugger{		
    private $debugLog;
    
    public function __construct() {
        $this->debugLog = DEBUG_LOG . date("-Y-m-d") . ".txt";
    }	
	
	/**
	* Appends the sql error to the end of the file ($this->file)
    */		
	public function debug($class, $method, $msg){
	    
		$message = "($class->$method) $msg";		
		$this->debugger($message);
	}
	
	/**
	* Appends the sql error to the end of the file ($this->file)
    */		
	public function debugger($msg){
		if (DEBUG){
			$fileName = null;
			$message = "\n" . date("m/d/y h:i:s") . " - " . $msg;
		
			if(isset($this->debugLog) && $this->debugLog != null){
				$fileName = $this->debugLog;
			}else{	
				$fileName = dirname(__FILE__) . "/../Logs/Debugger" . date("-Y-m-d") . ".txt";	
			}

			$file = fopen($fileName,"a");
			fwrite($file, $message);
			fclose($file);
		}
	}
}
{'fraction_non_alphanumeric': 0.20458452722063036, 'fraction_numerical': 0.0, 'mean_word_length': 2.7387580299785865, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '3279143', 'n_tokens_mistral': 685, 'n_tokens_neox': 639, 'n_words': 141}