<?php
function errLog( $str , $debug = false ){

	if( $debug ){
		return;
	};
	if( ! is_string($str) ){
		$str = json_encode($str);
	};

	$strLog = date('Y/m/d H:i:s') . "\t" . basename($_SERVER['PHP_SELF']). "\t" . $str . "\r\n";
	file_put_contents( CC\FILE::ERR_LOG , $strLog , FILE_APPEND );
	reqLog();
};
