<commit_before>include base.comparator.BaseComparator

include calendar.util.CalendarUtil

include string.util.StringUtil

LoggerUtil(){
	_formatLogLevel(){
		local logLevel=${1}
		local validLogLevels=(debug error info)

		local maxLength=$(_returnArrayMaxLength validLogLevels)

		while [[ $(BaseComparator isLessThan $(StringUtil
			length ${logLevel}) ${maxLength}) ]]; do

			local logLevel=$(StringUtil append ${logLevel} _)
		done

		StringUtil toUpperCase ${logLevel}
	}

	_returnArrayMaxLength(){
		local array=($(readvar ${1}))
		local maxLength=0

		for a in ${array[@]}; do
			if [[ ${#a} > ${maxLength} ]]; then
				local maxLength=${#a}
			fi
		done

		echo ${maxLength}
	}

	getLogMsg(){
		local _message=$(StringUtil capitalize ${2})
		local time=$(CalendarUtil getTimestamp log)

		local color=null

		if [[ $(BaseComparator isEqualIgnoreCase ${1} error) ]]; then
			local color=red
		elif [[ $(BaseComparator isEqualIgnoreCase ${1} debug) ]]; then
			local color=yellow
		fi

		echo -e "${time} [ $(_formatLogLevel ${1}) ] $(
			colorme ${color} $(StringUtil parseMessage _message))"
	}

	$@
}<commit_msg>Print time at more precise location<commit_after>include base.comparator.BaseComparator

include calendar.util.CalendarUtil

include string.util.StringUtil

LoggerUtil(){
	_formatLogLevel(){
		local logLevel=${1}
		local validLogLevels=(debug error info)

		local maxLength=$(_returnArrayMaxLength validLogLevels)

		while [[ $(BaseComparator isLessThan $(StringUtil
			length ${logLevel}) ${maxLength}) ]]; do

			local logLevel=$(StringUtil append ${logLevel} _)
		done

		StringUtil toUpperCase ${logLevel}
	}

	_returnArrayMaxLength(){
		local array=($(readvar ${1}))
		local maxLength=0

		for a in ${array[@]}; do
			if [[ ${#a} > ${maxLength} ]]; then
				local maxLength=${#a}
			fi
		done

		echo ${maxLength}
	}

	getLogMsg(){
		local _message=$(StringUtil capitalize ${2})
		local color=null

		if [[ $(BaseComparator isEqualIgnoreCase ${1} error) ]]; then
			local color=red
		elif [[ $(BaseComparator isEqualIgnoreCase ${1} debug) ]]; then
			local color=yellow
		fi

		echo -e "$(CalendarUtil getTimestamp log) [ $(_formatLogLevel ${1}) ] $(
			colorme ${color} $(StringUtil parseMessage _message))"
	}

	$@
}
{'fraction_non_alphanumeric': 0.14247551202137132, 'fraction_numerical': 0.006233303650934996, 'mean_word_length': 4.631578947368421, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1520176', 'n_tokens_mistral': 806, 'n_tokens_neox': 715, 'n_words': 187}