<commit_before>function LogFactory() {
	this.constructor.apply( this, arguments );
}

LogFactory.prototype = {
	
	jsonService: null,
	
	type: null,
	
	constructor: function( type, jsonService ) {
		this.type = type || "console";
		
		if ( jsonService ) {
			this.jsonService = jsonService;
		}
		
		jsonService = null;
	},
	
	getInstance: function( logHandle, level, debugMode, enabled ) {
		var className = this.capitalize( this.type ) + "Logger";
		var classReference = window[ className ];
		
		if ( typeof classReference === "function" ) {
			return new classReference( logHandle, level, debugMode, enabled );
		}
		else {
			throw new Error( "No logging object constructor function was found in window." + className + " for type " + this.type );
		}
	},
	
	
	
	// utility methods
	
	capitalize: function( str ) {
		return str.charAt( 0 ).toUpperCase() + str.substring( 1, str.length );
	}
	
};<commit_msg>Fixin LogFactory.<commit_after>function LogFactory() {
	this.constructor.apply( this, arguments );
}

LogFactory.prototype = {
	
	jsonService: null,
	
	type: null,
	
	constructor: function( type, jsonService ) {
		this.type = type || "console";
		
		if ( jsonService ) {
			this.jsonService = jsonService;
		}
		
		jsonService = null;
	},
	
	getInstance: function( logHandle, level, debugMode, enabled ) {
		var className = this.capitalize( this.type ) + "Logger";
		var classReference = window[ className ];
		var instance = null;
		
		if ( typeof classReference === "function" ) {
			instance = new classReference( logHandle, level, debugMode, enabled );
			
			if ( this.jsonService ) {
				instance.setJsonService( this.jsonService );
			}
			
			return instance;
		}
		else {
			throw new Error( "No logging object constructor function was found in window." + className + " for type " + this.type );
		}
	},
	
	
	
	// utility methods
	
	capitalize: function( str ) {
		return str.charAt( 0 ).toUpperCase() + str.substring( 1, str.length );
	}
	
};
{'fraction_non_alphanumeric': 0.12589194699286443, 'fraction_numerical': 0.0020387359836901123, 'mean_word_length': 3.2954048140043763, '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': '4480270', 'n_tokens_mistral': 685, 'n_tokens_neox': 578, 'n_words': 166}