final public function getEventListForAjax() {

		$app		= Application::getInstance();
		$router		= Router::getInstance();
		
		if (!$this->isEnabled() or !$router->sendLog()) {
			return NULL;
		}
		
		$log = '';

		// shows the log
		if (Options::get('show_log') and $app->currentUser->admin) {
		
			$showQueries = isset($_COOKIE['LogShowQueries']) ? $_COOKIE['LogShowQueries'] : 0;
			
			foreach ($this->events as $e) {
			
				// if it's query, verifies cookie val
				$class = $e->type . (('query'==$e->type and !$showQueries) ? ' hidden' : '');
				
				$log .=
					'<div class="' . $class . '"><span class="time">' .
					$this->formatChrono($e->chrono) . '</span> ' . htmlspecialchars($e->description) .
					($e->subtext ? ' <span>| ' . htmlspecialchars($e->subtext) . '</span>' : '') . '</div>';
				
			}
			
		}
		
		return $log;
		
	}